
.settings-container {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 20px !important;
  background: #f4f7fa;
  height: auto !important;
  min-height: auto !important;
  box-sizing: border-box;
  overflow: visible !important;
}

/* Decorative corner ribbons */
.settings-container::before,
.settings-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.settings-container::before {
  background:
    linear-gradient(
      132deg,
      transparent 0%,
      transparent 9%,
      rgba(65, 184, 92, 0.09) 9.2%,
      rgba(65, 184, 92, 0.09) 17%,
      transparent 17.2%,
      transparent 21%,
      rgba(65, 184, 92, 0.055) 21.2%,
      rgba(65, 184, 92, 0.055) 25%,
      transparent 25.2%
    );
}

.settings-container::after {
  background:
    linear-gradient(
      312deg,
      transparent 0%,
      transparent 10%,
      rgba(65, 184, 92, 0.09) 10.2%,
      rgba(65, 184, 92, 0.09) 18%,
      transparent 18.2%,
      transparent 22%,
      rgba(65, 184, 92, 0.055) 22.2%,
      rgba(65, 184, 92, 0.055) 26%,
      transparent 26.2%
    );
}


/* Hero Profile Section */
.settings-hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
  border: 1px solid #eaeef2;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  width: 115px;
  height: 115px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #41b85c, #2e8540);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(65, 184, 92, 0.22);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.camera-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 34px;
  height: 34px;
  background: #41b85c;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.camera-badge:hover {
  background: #369c4e;
  transform: scale(1.08);
}

/* Full Photo Preview Modal Overlay */
.avatar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.avatar-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 360px;
  border-radius: 14px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.avatar-modal-body {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
}

/* Uncropped rectangular/full image view container */
.avatar-full-preview-container {
  width: 100%;
  max-height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #000000;
}

#modalAvatarPreview {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.avatar-modal-footer {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.avatar-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.avatar-btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.avatar-btn-cancel:hover {
  background: #e2e8f0;
}

.avatar-btn-done {
  background: #41b85c;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(65, 184, 92, 0.2);
}

.avatar-btn-done:hover {
  background: #369c4e;
}

/* Settings Card Container */
.settings-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #eaeef2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
  overflow: hidden;
}

/* Settings Row Item */
.settings-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.2s ease;
}

.settings-row-item:hover {
  background: #f8fafc;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 0.95rem;
}

.row-icon {
  color: #41b85c;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.row-arrow {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.settings-row-item:hover .row-arrow {
  transform: translateX(3px);
  color: #41b85c;
}

/* Cardless Notification Container */
.notif-clean-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 6px;
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-heading-icon {
  color: #41b85c;
  font-size: 1.15rem;
}

.notif-header-title h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #1e293b;
  font-weight: 700;
}

.notif-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Toggle Row Styling */
.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
  margin-top: 4px;
}

/* Modern Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: #41b85c;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}


/* Small Back Button - Far Left */
.notif-footer-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 14px;
  width: 100%;
}

.notif-action-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.notif-back-btn {
  background: #ffffff;
  color: #475569;
}

.notif-back-btn:hover {
  background: #f1f5f9;
}

/* Notification View - Full Available Height */
#notificationSettingsView {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
}

/* Notification Content */
#notificationSettingsView .notif-clean-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 65vh;
  box-sizing: border-box;
}

/* Back Button - Bottom Far Left */
#notificationSettingsView .notif-footer-actions {
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 8px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  width: 100%;
}

#notificationSettingsView .notif-back-btn {
  padding: 5px 10px;
  font-size: 0.75rem;
  width: auto;
}
/* PROFILE INFO SECTION */

.profile-info-section {
  margin-top: 20px;
  margin-bottom: 16px;
}

.profile-info-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.profile-info-heading i {
  color: #41b85c;
  font-size: 1.1rem;
}

.profile-info-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #eaeef2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid #eef1f4;
  cursor: pointer;
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-info-label {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-info-value {
  color: #64748b;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.profile-info-row > i {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-left: 12px;
  flex-shrink: 0;
}
/* PROFILE INFO EDIT VIEW */

.profile-edit-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
}

.profile-edit-field label {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-edit-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 0.95rem;
  outline: none;
}

.profile-edit-field input:focus {
  border-color: #41b85c;
}

.profile-edit-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
}

.profile-save-btn {
  background: #41b85c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
/* =========================================
   SECURITY SETTINGS - ADDITIONAL STYLES
   ========================================= */

.security-options-card .settings-row-item + .settings-row-item {
  border-top: 1px solid #eef1f4;
}

#securitySettingsView,
#passwordSettingsView,
#walletPinSettingsView {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
}

#securitySettingsView .notif-clean-container,
#passwordSettingsView .notif-clean-container,
#walletPinSettingsView .notif-clean-container {
  flex: 1;
  min-height: 65vh;
  box-sizing: border-box;
}

.security-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 22px;
  padding-bottom: 8px;
  width: 100%;
}

.security-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-top: 22px;
}

.security-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-input-group label {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
}

.security-input-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 0.95rem;
  outline: none;
}

.security-input-group input:focus {
  border-color: #41b85c;
  box-shadow: 0 0 0 2px rgba(65, 184, 92, 0.10);
}

/* PASSWORD INPUT WITH EYE ICON INSIDE ON THE RIGHT */

.security-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.security-password-wrapper input {
  width: 100%;
  padding-right: 48px !important;
  box-sizing: border-box;
}

.security-eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent !important;
  border: none !important;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  z-index: 5;
}

.security-eye-btn:hover {
  color: #41b85c;
}

.security-eye-btn i {
  pointer-events: none;
}

.security-form-actions {
  gap: 12px;
}

.security-form-actions .profile-save-btn {
  min-height: 34px;
}

.security-message {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.security-otp-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.security-otp-card {
  background: #fff;
  width: 100%;
  max-width: 390px;
  padding: 24px 20px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.security-otp-card h3 {
  margin: 0 0 9px;
  color: #1e293b;
}

.security-otp-card p {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.security-otp-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0;
}

.security-otp-inputs input {
  width: 42px;
  height: 48px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
}

.security-otp-inputs input:focus {
  border-color: #41b85c;
}

.security-otp-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 380px) {
  .security-otp-inputs {
    gap: 5px;
  }

  .security-otp-inputs input {
    width: 37px;
    height: 44px;
  }

  .security-form-actions .profile-save-btn {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =========================================
   SETTINGS PAGE SCROLL FIX
   ADDITIVE - KEEP EXISTING CSS
   ========================================= */

html,
body {
  min-height: 100%;
  height: auto !important;
  overflow-x: hidden;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.main.settings-container {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
}

#mainSettingsView {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

@media (max-width: 768px) {
  .main.settings-container {
    padding-bottom: 110px !important;
  }
}
/* PASSWORD REQUIREMENTS BOX */
.password-strength-box {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.password-strength-box strong {
  display: block;
  margin-bottom: 7px;
}

.password-strength-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-strength-box li {
  margin: 5px 0;
  color: #dc2626;
}

.password-match-message {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 600;
}

.password-match-message.match {
  color: #16a34a;
}

.password-match-message.no-match {
  color: #dc2626;
}
/* =========================================
   DELETE ACCOUNT SECTION
   ADDITIVE - SETTINGS B
   ========================================= */

.delete-account-card {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.delete-account-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dc2626;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.delete-account-card p {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.delete-account-btn {
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.delete-account-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

/* DELETE ACCOUNT MODAL */

.settings-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
}

.settings-delete-card {
  width: 100%;
  max-width: 390px;
  background: #ffffff;
  border-top: 5px solid #dc2626;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.settings-delete-step {
  display: none;
}

.settings-delete-step.active {
  display: block;
}

.settings-delete-card h3 {
  color: #1e293b;
  font-size: 1.05rem;
  margin: 0 0 12px;
}

.settings-delete-card h3 i {
  color: #dc2626;
  margin-right: 5px;
}

.settings-delete-card p {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.settings-delete-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.settings-delete-card button {
  cursor: pointer;
}

.settings-delete-step > button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 7px;
  background: #dc2626;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
}

.settings-delete-step > button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-delete-otp-inputs {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 20px 0;
}

.settings-delete-otp-digit {
  width: 40px;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

.settings-delete-otp-digit:focus {
  outline: none;
  border-color: #dc2626;
}

.settings-delete-warning {
  color: #dc2626 !important;
  font-weight: 600;
}

.settings-delete-error {
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-top: 12px;
}

.settings-delete-cancel {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-weight: 600;
}

@media (max-width: 380px) {
  .settings-delete-otp-inputs {
    gap: 5px;
  }

  .settings-delete-otp-digit {
    width: 36px;
    height: 43px;
  }
}
/* LOGOUT SECTION */

.logout-settings-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #64748b;
  border-radius: 12px;
  padding: 18px;
  margin-top: 0;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.logout-settings-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.logout-settings-heading i {
  color: #64748b;
}

.logout-settings-card p {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.logout-settings-btn {
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.logout-settings-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

/* =========================================
   SETTINGS BACKGROUND - FULL SCREEN FIX
   ADD AT THE VERY END OF settings.CSS
   ========================================= */

html,
body {
    min-height: 100%;
    height: auto !important;
    margin: 0;
    overflow-x: hidden;
}

/* Keep the original background color and corner decorations */
.main.settings-container,
.settings-container {
    position: relative;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    height: auto !important;
    max-height: none !important;
    box-sizing: border-box;
    overflow: visible !important;
    background-color: #f4f7fa;
}

/* Ensure the active settings view fills the available screen */
#mainSettingsView,
#notificationSettingsView,
#securitySettingsView,
#passwordSettingsView,
#walletPinSettingsView {
    box-sizing: border-box;
    min-height: calc(100vh - 20px);
    min-height: calc(100dvh - 20px);
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Preserve flex layout for the inner settings views */
#notificationSettingsView,
#securitySettingsView,
#passwordSettingsView,
#walletPinSettingsView {
    display: flex;
    flex-direction: column;
}

/* Keep notification and security content flexible */
#notificationSettingsView .notif-clean-container,
#securitySettingsView .notif-clean-container,
#passwordSettingsView .notif-clean-container,
#walletPinSettingsView .notif-clean-container {
    flex: 1 0 auto;
    min-height: 0;
    box-sizing: border-box;
}

/* Mobile spacing */
@media (max-width: 768px) {
    .main.settings-container,
    .settings-container {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding-bottom: 110px !important;
    }
}
