/* ================================================================
   settings.css  |  assets/css/settings.css
================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  background: #f3f5f9;
  color: #0a2342;
  min-height: 100vh;
}

/* ── HEADER ── */
.settings-header {
  background: linear-gradient(135deg, #4b38f5, #6a5cff);
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}
.settings-header .hc {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 800px;
  margin: auto;
  padding: 0 20px;
}
.back-btn {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.85;
}
.back-btn:hover {
  opacity: 1;
}
.settings-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

/* ── LAYOUT ── */
.page-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ── PROFILE HERO ── */
.profile-hero {
  background: linear-gradient(135deg, #021633, #1e3a6e);
  color: white;
  border-radius: 22px;
  padding: 32px 36px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  object-fit: cover;
  background: #1e3a6e;
  flex-shrink: 0;
}
.profile-hero-info h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.profile-hero-info p {
  opacity: 0.7;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.account-badge .material-icons-outlined {
  font-size: 1rem;
}

/* ── CARDS ── */
.settings-card {
  background: white;
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0a2342;
}
.card-title .material-icons-outlined {
  color: #4b38f5;
  font-size: 1.2rem;
}

/* ── INFO GRID ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.info-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #999;
  margin-bottom: 7px;
}
.info-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e8eaee;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: "Inter", sans-serif;
  background: #f9fafb;
  color: #0a2342;
  outline: none;
}
.info-field input:focus {
  border-color: #4b38f5;
  background: white;
  box-shadow: 0 0 0 3px rgba(75, 56, 245, 0.08);
}
.info-field.full {
  grid-column: span 2;
}

/* ── SECURITY ACTIONS ── */
.security-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1.5px solid #e8eaee;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  transition: 0.2s;
}
.security-row:hover {
  border-color: #4b38f5;
  background: #f0f2ff;
}
.security-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sec-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sec-icon.purple {
  background: #f0f2ff;
  color: #4b38f5;
}
.sec-icon.red {
  background: #ffebee;
  color: #c62828;
}
.sec-icon.green {
  background: #e8f5e9;
  color: #2e7d32;
}
.security-row strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.security-row span {
  font-size: 0.78rem;
  color: #888;
}
.security-row .material-icons-outlined.arrow {
  color: #bbb;
  font-size: 1.1rem;
}

/* ── PREFERENCES ── */
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f0f2f5;
}
.pref-row:last-child {
  border-bottom: none;
}
.pref-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pref-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2ff;
  color: #4b38f5;
}
.pref-label strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.pref-label span {
  font-size: 0.78rem;
  color: #888;
}
/* toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ddd;
  border-radius: 26px;
  transition: 0.3s;
}
.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
input:checked + .slider {
  background: #4b38f5;
}
input:checked + .slider::before {
  transform: translateX(22px);
}

/* ── DANGER ZONE ── */
.danger-card {
  background: #fff5f5;
  border: 1.5px solid #ffcdd2;
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 20px;
}
.danger-title {
  font-size: 1rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.danger-title .material-icons-outlined {
  font-size: 1.2rem;
}
.danger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1.5px solid #e53935;
  background: white;
  color: #e53935;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: 0.2s;
}
.danger-btn:hover {
  background: #e53935;
  color: white;
}

/* ── MODAL OVERLAY ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: white;
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 440px;
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-box p {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 22px;
}
.modal-form-group {
  margin-bottom: 16px;
}
.modal-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 7px;
}
.modal-form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e4ee;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: "Inter", sans-serif;
  outline: none;
}
.modal-form-group input:focus {
  border-color: #4b38f5;
  box-shadow: 0 0 0 3px rgba(75, 56, 245, 0.08);
}
.error-msg {
  font-size: 0.82rem;
  color: #e53935;
  margin-bottom: 12px;
  min-height: 18px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.btn-confirm {
  flex: 1;
  padding: 13px;
  background: linear-gradient(135deg, #4b38f5, #6a5cff);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: 0.2s;
}
.btn-confirm:hover {
  filter: brightness(1.1);
}
.btn-cancel {
  flex: 1;
  padding: 13px;
  background: #f0f0f0;
  color: #333;
  border: none;
  border-radius: 25px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: 0.2s;
}
.btn-cancel:hover {
  background: #e0e0e0;
}
/* OTP step */
.otp-step {
  display: none;
}
.otp-step.visible {
  display: block;
}
.otp-input-big {
  width: 100%;
  padding: 14px;
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 10px;
  border: 2px solid #e0e4ee;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  outline: none;
}
.otp-input-big:focus {
  border-color: #4b38f5;
}
.otp-hint {
  font-size: 0.78rem;
  color: #aaa;
  text-align: center;
  margin-top: 8px;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: #0a2342;
  color: white;
  padding: 12px 26px;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: 0.4s;
  opacity: 0;
  z-index: 9999;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── DARK MODE ── */
.dark-mode {
  background: #121212;
  color: #e0e0e0;
}
.dark-mode .settings-card {
  background: #1c1f35;
  color: #e0e0e0;
}
.dark-mode .card-title {
  color: #e0e0e0;
}
.dark-mode .info-field input {
  background: #13162a;
  border-color: #2e3250;
  color: #e0e0e0;
}
.dark-mode .security-row {
  background: #13162a;
  border-color: #2e3250;
}
.dark-mode .security-row:hover {
  background: #1a1d3a;
  border-color: #4b38f5;
}
.dark-mode .security-row span {
  color: #888;
}
.dark-mode .pref-row {
  border-bottom-color: #2e3250;
}
.dark-mode .pref-label span {
  color: #888;
}
.dark-mode .modal-box {
  background: #1c1f35;
  color: #e0e0e0;
}
.dark-mode .modal-box p {
  color: #aaa;
}
.dark-mode .modal-form-group input {
  background: #13162a;
  border-color: #2e3250;
  color: #e0e0e0;
}

@media (max-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  .info-field.full {
    grid-column: auto;
  }
  .profile-hero {
    flex-direction: column;
    text-align: center;
  }
  .modal-actions {
    flex-direction: column;
  }
}
