:root {
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --card-hover-transform: translateY(-5px);
  --input-bg: #f8f9fa;
  --input-focus-shadow: 0 0 0 4px rgba(255, 122, 4, 0.15);
}
header.main-header .header-sticky,
.navbar {
  background: var(--base-bg) !important;
  box-shadow: none !important;
}
.profile-container {
  padding-top: 100px;
  padding-bottom: 40px;
  min-height: 100vh;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes pulse-soft {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 186, 154, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 186, 154, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 186, 154, 0);
  }
}
.glass-card {
  background: var(--white-color);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  padding: 30px;
  margin-bottom: 25px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  animation: fadeInUp 0.6s ease-out forwards;
  position: relative;
  overflow: visible;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}
.profile-hero {
  text-align: center;
  margin-bottom: 30px;
}
.profile-avatar-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: visible;
  cursor: pointer;
}
.profile-hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.profile-avatar-wrapper:hover .profile-hero-avatar {
  transform: scale(1.05);
  filter: brightness(0.85);
  box-shadow: 0 15px 45px rgba(255, 122, 4, 0.25);
}
.avatar-camera-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  color: white;
  font-size: 2rem;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.profile-avatar-wrapper:hover:not(.editing) .avatar-camera-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.profile-avatar-wrapper.editing .avatar-camera-overlay {
  top: auto;
  bottom: 0;
  left: auto;
  right: 0;
  transform: scale(1);
  opacity: 1;
  background: var(--primary-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(255, 122, 4, 0.3);
  pointer-events: none;
}
.profile-avatar-wrapper.editing:hover .profile-hero-avatar {
  filter: brightness(0.9);
}
.profile-avatar-wrapper.uploading .avatar-camera-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
}
.profile-avatar-wrapper.uploading .profile-hero-avatar,
.profile-avatar-wrapper.uploading .profile-hero-initial {
  filter: brightness(0.7);
  transform: scale(0.98);
}
.profile-hero-initial {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ff9f43);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 800;
  border: 4px solid white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}
.profile-avatar-wrapper:hover .profile-hero-initial {
  filter: brightness(0.9);
  transform: scale(1.05);
}
.member-badge {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff7a04, #ff9f43);
  color: white;
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(255, 122, 4, 0.3);
  border: 2px solid white;
  white-space: nowrap;
  z-index: 30;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.profile-name {
  color: var(--text-color);
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}
.profile-hero.has-badge .profile-name {
  margin-top: 55px; 
}
.profile-email {
  color: #718096;
  font-weight: 500;
  font-size: 1rem;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.card-title-premium {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
  letter-spacing: -0.5px;
}
.header-actions {
  display: flex;
  gap: 12px;
}
.btn-premium-outline {
  background: rgba(255, 122, 4, 0.05);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.btn-premium-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 122, 4, 0.2);
}

.form-group-refined {
  margin-bottom: 20px;
}
.label-premium {
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.input-with-icon {
  position: relative;
}
.input-with-icon .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 1.1rem;
  opacity: 0.8;
  z-index: 10;
  transition: all 0.3s ease;
}
.form-control-premium {
  width: 100%;
  padding: 14px 20px 14px 48px !important;
  background: var(--input-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
}
.form-control-premium:focus {
  background: white;
  border-color: var(--primary-color);
  box-shadow: var(--input-focus-shadow);
  outline: none;
}
.form-control-premium:focus + .input-icon {
  color: var(--primary-color);
  opacity: 1;
}

.avatar-upload-refined {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 24px;
  background: var(--white-color);
  border: 1.5px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}
.avatar-upload-refined:hover {
  border-color: rgba(255, 122, 4, 0.15);
  background: rgba(255, 122, 4, 0.02);
}
.clickable-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  width: 100%;
}
.mini-avatar-container-refined {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: visible;
  border: 3px solid white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
}
.mini-avatar-container-refined img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  border-radius: 50%;
}
.mini-avatar-camera-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  color: white;
  font-size: 1.25rem;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
  pointer-events: none;
}
.clickable-avatar-section .mini-avatar-camera-overlay {
  top: auto;
  bottom: -6px;
  left: auto;
  right: -6px;
  transform: scale(1);
  opacity: 1;
  background: var(--primary-color);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 2px solid white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.clickable-avatar-section:hover .mini-avatar-container-refined img {
  filter: brightness(0.9);
  transform: scale(1.05);
}
.mini-avatar-container-refined.uploading .mini-avatar-camera-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
}
.upload-text-content {
  display: flex;
  flex-direction: column;
}
.upload-hint {
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.upload-subtext {
  color: #718096;
  font-size: 0.8rem;
  font-weight: 500;
}
.btn-remove-photo {
  margin-top: 8px;
  align-self: flex-start;
  border: none;
  background: transparent;
  color: #e85c3a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.btn-remove-photo:hover {
  color: #c73f1d;
}
.mini-initial-refined {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f97316, #ff9f43);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 850;
}
.btn-upload-premium {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.btn-upload-premium:hover {
  background: #e67300;
  transform: translateY(-2px);
}
.btn-save-premium {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(255, 122, 4, 0.25);
  cursor: pointer;
}
.btn-explore-packages {
  width: auto !important;
  display: inline-flex !important;
  padding: 12px 35px;
  border-radius: 50px;
}
.btn-save-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 122, 4, 0.35);
}
.btn-save-premium:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

.subscription-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 15px;
  background: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
  letter-spacing: 0.3px;
  text-transform: capitalize;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.status-active {
  color: #00b894;
  background: rgba(0, 184, 148, 0.05);
  border-color: rgba(0, 184, 148, 0.12);
}

.status-active .status-indicator {
  background: #00b894;
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
  animation: status-pulse-green 2s infinite;
}

@keyframes status-pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 184, 148, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 184, 148, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 184, 148, 0); }
}

.status-expired {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.05);
  border-color: rgba(255, 71, 87, 0.12);
}
.status-expired .status-indicator {
  background: #ff4757;
}

.plan-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 15px 0 20px;
}
.plan-stat {
  background: #fbfbfc;
  padding: 12px 10px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}
.plan-stat:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: rgba(255, 122, 4, 0.2);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}
.plan-stat label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: #a0aec0;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  display: block;
}
.plan-stat span {
  font-size: 0.9rem;
  font-weight: 800;
  color: #2d3748;
  display: block;
}

.days-left-container {
  padding: 15px 20px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.03);
  margin-bottom: 20px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 800;
  color: #1a202c;
  font-size: 0.85rem;
}
.progress-track {
  width: 100%;
  height: 10px;
  background: #f1f4f8;
  border-radius: 50px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff7a04 0%, #ff9f43 100%);
  border-radius: 50px;
}

@media (max-width: 991px) {
  .profile-container {
    padding-top: 90px;
  }
}
@media (max-width: 768px) {
  .glass-card {
    padding: 24px 20px;
  }
  .card-title-premium, 
  .card-title-premium-accent,
  .profile-hero + .row .glass-card h3:not(.upgrade-duration),
  .profile-container h3:not(.upgrade-duration) {
    font-size: 1.2rem !important;
    letter-spacing: -0.3px !important;
    font-weight: 800 !important;
    margin-bottom: 20px !important;
  }

  .header-actions {
    width: 100%;
    position: static !important; 
    margin-top: 10px;
  }
  .profile-name {
    font-size: 1.8rem;
  }

  .card-title-premium, 
  .card-title-premium-accent,
  .glass-card h3:not(.upgrade-duration) {
    font-size: 1.25rem !important;
    letter-spacing: -0.2px !important;
  }

  .avatar-upload-refined {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .btn-upload-premium {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
}

/* --- MODAL STYLES --- */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.custom-modal.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: white;
  width: 90%;
  max-width: 450px;
  border-radius: 28px;
  padding: 35px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}
.custom-modal.active .modal-content {
  transform: translateY(0);
}
.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}
.close-modal:hover {
  color: var(--primary-color);
}
.password-field-wrapper {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
}
.password-toggle:hover {
  color: var(--primary-color);
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}
.card-title-premium-accent {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-color);
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}
.mini-brand-logo {
  width: 50px;
  height: auto;
  opacity: 0.8;
  filter: grayscale(0.2);
}

.referral-box-premium {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fffcf9 0%, #ffffff 100%);
  border: 1px solid rgba(255, 122, 4, 0.08);
  margin-top: 5px;
}
.referral-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.referral-icon {
  font-size: 1.3rem;
  color: white;
  background: linear-gradient(135deg, #ff7a04, #ff9f43);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(255, 122, 4, 0.2);
}
.referral-title {
  font-weight: 800;
  color: #1a202c;
  font-size: 1.1rem;
  margin-bottom: 0px;
}
.referral-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #718096;
  font-weight: 600;
}
.referral-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.referral-code-display {
  flex: 1;
  background: rgba(255, 122, 4, 0.03);
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 122, 4, 0.2);
  font-weight: 900;
  font-size: 1.2rem;
  color: #ff7a04;
  letter-spacing: 1px;
  text-align: center;
}
.btn-copy-code {
  background: #2d3748;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
}
.referral-footer-note {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #718096;
  text-align: center;
  font-weight: 600;
}
.referral-footer-note b {
  color: #00ba9a;
  background: rgba(0, 186, 154, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.logout-profile-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #ff4757;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.logout-profile-btn:hover {
  background: #fffafa;
  color: #d12c3c;
  transform: scale(1.1);
}


@media (max-width: 768px) {
  .profile-container {
    padding-top: 140px !important; 
    padding-bottom: 30px;
  }
  
  .profile-hero {
    margin-bottom: 15px;
    padding: 30px 15px 15px; 
    border-radius: 30px;
    background: transparent !important;
    box-shadow: none !important;
    position: relative;
    overflow: visible;
    border: none !important;
    backdrop-filter: none !important;
  }

  .profile-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 122, 4, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
  }
  
  .profile-avatar-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: 25px; 
    position: relative;
    z-index: 2;
  }
  
  .profile-name {
    font-size: 1.75rem;
    margin-top: 40px; 
    margin-bottom: 8px;
    font-weight: 900;
    position: relative;
    z-index: 2;
    color: #1a202c;
  }
  
  .profile-email {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    font-weight: 600;
  }



  .glass-card {
    padding: 25px 18px !important; /* Slightly tighter padding */
    margin: 0 0 25px 0 !important; /* Balanced: Removed margin-right offset */
    position: relative !important; /* For absolute positioning of edit btn */
  }
  
  .subscription-premium-card {
    margin: 0 0 25px 0 !important; /* Balanced: Removed margin-right offset */
  }
  
  .personal-details-card .card-header-flex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 25px !important;
  }
  
  .personal-details-card .card-header-flex {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding-bottom: 0 !important;
  }

  .personal-details-card .card-title-premium {
    font-size: 1.25rem !important;
    margin: 0 !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    min-width: 0 !important;
  }

  .personal-details-card .header-actions {
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
  }

  .personal-details-card .card-title-premium {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  #profileAdminDashboardBtn {
    flex: 0 0 auto !important;
    width: auto !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(255, 122, 4, 0.15) !important;
    padding: 10px 12px !important;
    height: 46px !important;
    border-radius: 14px !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
  }

  #editToggleBtn {
    flex: 0 0 auto !important;
    width: auto !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(255, 122, 4, 0.15) !important;
    padding: 10px 12px !important;
    height: 46px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
  }

  #profileAdminDashboardBtn i,
  #editToggleBtn i {
    font-size: 1rem !important;
    color: var(--primary-color) !important;
    margin: 0 !important;
  }

  #profileAdminDashboardBtn:active,
  #editToggleBtn:active {
    transform: scale(0.92);
    background: #f8f9fa !important;
  }

  .settings-dropdown-wrapper {
    top: 15px !important;
    right: 15px !important;
  }

  .settings-btn {
    width: 40px;
    height: 40px;
    background: #fdfdfd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  }

  .glass-card {
    padding: 25px 20px !important;
    border-radius: 28px !important;
    margin-bottom: 20px;
  }

  .card-title-premium {
    font-size: 1.25rem !important;
    margin-bottom: 0 !important;
  }

  /* Consolidated into above block */

  .form-group-refined {
    margin-bottom: 18px;
  }

  .label-premium {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.8px;
  }

  .form-control-premium {
    height: 52px;
    font-size: 0.95rem;
    padding: 0 15px 0 45px !important;
    background: #fbfbfb;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
  }

  .input-icon {
    font-size: 1rem;
    left: 17px;
  }

  .subscription-status {
    padding: 6px 15px;
    font-size: 0.8rem;
    margin-bottom: 20px;
  }

  .plan-details-grid {
    grid-template-columns: repeat(2, 1fr); /* Balanced 2-column grid for mobile */
    gap: 12px;
    margin: 15px 0;
  }

  .plan-stat {
    padding: 15px 12px;
    border-radius: 18px;
    height: 100%; /* Uniform height */
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05); /* Slightly more visible border */
  }

  .plan-stat:first-child {
    grid-column: span 2; /* Main plan takes full width for clear visibility */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 18px 20px;
  }

  .plan-stat:first-child label {
    margin-bottom: 0;
    font-size: 0.65rem;
  }

  .plan-stat:first-child span {
    font-size: 1rem;
  }

  .plan-stat label {
    font-size: 0.6rem;
    margin-bottom: 5px;
    color: #94a3b8;
  }

  .plan-stat span {
    font-size: 0.85rem;
    color: #1a202c;
  }

  .days-left-container {
    padding: 18px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  }

  /* Referral Card Optimization */
  .referral-box-premium {
    padding: 20px;
    border-radius: 24px;
    margin-top: 15px;
  }

  .referral-input-group {
    flex-direction: row; /* Keep on same line on mobile now */
    gap: 8px;
    background: #fbfbfc;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  }

  .referral-code-display {
    width: 100%;
    padding: 10px;
    font-size: 1.1rem;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    border: none;
  }

  .btn-copy-code {
    width: 44px; /* Square icon-only button */
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 8px;
    font-size: 0; /* Hide 'Copy' text */
    flex-shrink: 0;
    justify-content: center;
    background: var(--primary-color) !important;
  }

  .btn-copy-code i {
    font-size: 1.1rem; /* Only show the icon */
    margin-right: 0 !important;
  }
}

@media (max-width: 480px) {
  .profile-container {
    padding-top: 10px !important;
  }
  
  .profile-hero {
    padding: 30px 10px;
  }

  .profile-name {
    font-size: 1.5rem;
  }
  
  .card-title-premium {
    font-size: 1.2rem;
  }
}

/* --- SETTINGS DROPDOWN --- */
.settings-btn {
  background: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0,0,0,0.05);
}
.settings-btn:hover {
  transform: rotate(90deg) scale(1.1);
  color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.settings-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  background: white;
  min-width: 220px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  padding: 10px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0,0,0,0.05);
}
.settings-dropdown.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.settings-dropdown a {
  padding: 14px 20px;
  text-decoration: none !important;
  color: #333;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  transition: all 0.2s;
  white-space: nowrap !important; /* Force 1 line as requested */
}
.settings-dropdown a:hover {
  background: #f8f9fa;
  color: var(--primary-color);
  padding-left: 24px;
}
.logout-link {
  color: #ff4757 !important;
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
  padding-top: 18px !important;
}

/* --- UPGRADE CARDS (Ultimate Premium) --- */
.upgrade-card-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 35px;
  letter-spacing: -1px;
}
/* --- MINIMALIST UPGRADE CARDS --- */
/* --- SUPREME PROFESSIONAL UPGRADE CARDS --- */
/* --- BOUTIQUE PREMIUM UPGRADE CARDS --- */
.plan-upgrade-card-premium {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-decoration: none !important;
  border-radius: 28px;
  padding: 30px 25px;
  /* Ultra-smooth cinematic transition */
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  height: 180px; 
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.03);
  z-index: 1;
  overflow: visible;
}

.plan-upgrade-card-premium.theme-teal {
  border-bottom: 4px solid rgba(0, 186, 154, 0.1);
}
.plan-upgrade-card-premium.theme-orange {
  border-bottom: 4px solid rgba(255, 122, 4, 0.1);
}

/* HIGH-END HOVER (THE "BLOOM" EFFECT) */
.plan-upgrade-card-premium:hover {
  transform: translateY(-10px) scale(1.02);
  background: #ffffff;
}

.theme-teal:hover {
  box-shadow: 0 30px 60px rgba(0, 186, 154, 0.15), 0 0 100px rgba(0, 186, 154, 0.05);
  border-color: rgba(0, 186, 154, 0.4);
}
.theme-orange:hover {
  box-shadow: 0 30px 60px rgba(255, 122, 4, 0.15), 0 0 100px rgba(255, 122, 4, 0.05);
  border-color: rgba(255, 122, 4, 0.4);
}

/* --- ELITE CINEMATIC UPGRADE CARDS (Ultra-Premium Redesign) --- */
.plan-upgrade-card-premium {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none !important;
  border-radius: 22px;
  padding: 16px 15px;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  min-height: 145px;
  text-align: center;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 0px !important;
}

/* Tighten parent card to remove bottom waste */
.profile-container .glass-card:has(#dynamicUpgradePackages) {
  padding-bottom: 5px !important;
}

/* Premium Gradient Palettes */
.theme-teal { 
  background: linear-gradient(135deg, #00ba9a 0%, #00d2ff 100%) !important; 
  color: white !important; 
}
.theme-orange { 
  background: linear-gradient(135deg, #ff7e00 0%, #ff9f43 100%) !important; 
  color: white !important; 
}

/* Subtle Geometric Background Pattern */
.plan-upgrade-card-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23FFFFFF' fill-opacity='0.08' d='M45,-78.2C58.3,-71.4,69.2,-58.5,76.4,-44C83.6,-29.4,87.2,-13.2,87,3.1C86.7,19.3,82.6,35.6,73.7,48.9C64.9,62.2,51.3,72.4,36.5,78.2C21.7,84,5.7,85.2,-10.1,83.1C-25.8,81,-41.2,75.6,-54.6,66.6C-68.1,57.7,-79.5,45.2,-84.9,30.7C-90.4,16.2,-89.9,-0.3,-85.9,-15.2C-81.8,-30.1,-74.2,-43.3,-63.3,-52.3C-52.5,-61.2,-38.4,-66,-25.2,-73C-12.1,-80,0.1,-89.2,14.2,-88.6C28.2,-88.1,43.2,-77.8,45,-78.2Z' transform='translate(100 100)' /%3E%3C/svg%3E") no-repeat center;
  background-size: 150%;
  z-index: -1;
  opacity: 0.5;
  transition: transform 0.8s ease;
}

.plan-upgrade-card-premium:hover {
  transform: translateY(-8px);
  filter: brightness(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.plan-upgrade-card-premium:hover::after {
  transform: scale(1.1) rotate(5deg);
}

.upgrade-duration {
  font-size: 0.85rem; /* Increased for better visibility */
  font-weight: 850;
  color: rgba(255, 255, 255, 1); /* Full opacity for maximum clarity */
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.upgrade-price {
  font-size: 3.5rem; /* Slightly larger price */
  font-weight: 950;
  color: white !important;
  margin: 0 0 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0.9;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  -webkit-text-fill-color: white !important;
}

.upgrade-price .currency {
  font-size: 1.8rem;
  font-weight: 800;
  margin-right: 3px;
  color: rgba(255, 255, 255, 0.8) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.8) !important;
}

/* Premium White Action Button */
.upgrade-cta-btn {
  background: #ffffff !important;
  color: inherit !important; 
  width: 90%;
  padding: 10px 0;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.15rem; /* Increased button font size */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-teal .upgrade-cta-btn { color: #00ba9a !important; }
.theme-orange .upgrade-cta-btn { color: #ff7e00 !important; }

.plan-upgrade-card-premium:hover .upgrade-cta-btn {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .plan-upgrade-card-premium {
    min-height: 140px; 
    padding: 14px 10px;
    margin-bottom: 12px !important; /* Kept for stacked spacing */
  }
  .upgrade-price { font-size: 3rem !important; }
  .upgrade-duration { font-size: 0.75rem !important; }
  .upgrade-cta-btn { font-size: 1rem !important; padding: 10px 0 !important; }
  
  /* Parent card mobile tighten */
  .profile-container .glass-card:has(#dynamicUpgradePackages) {
    padding-bottom: 5px !important;
  }
}




