/* =========================================================================
   EDIT PROFILE — modern redesign. Matches the dashboard card design
   (Montserrat, Modern-Clean/Light tokens). Everything scoped under
   #profile-redesign so it can't leak. Icons: Font Awesome 5 Pro.
   ========================================================================= */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap");

#profile-redesign {
  --brand-blue: #00b4ff;
  --brand-blue-2: #2b9cd3;
  --brand-green: #36bea6;
  --brand-green-2: #2cdd9b;
  --surface: #fff;
  --surface-2: #f7f9fc;
  --line: #e7ecf3;
  --line-strong: #d8e0ea;
  --ink: #1f2a37;
  --ink-2: #5b6b7f;
  --ink-3: #8a99ad;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.07);
  --grad-blue: linear-gradient(135deg, #2b9cd3, #00b4ff);
  --grad-green: linear-gradient(135deg, #36bea6, #2cdd9b);
  --red: #e8533a;
  --red-bg: #fff0ed;
  --amber: #ffb85c;
  max-width: 880px;
  margin: 0 auto;
  font-family: "Montserrat", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
#profile-redesign *,
#profile-redesign *::before,
#profile-redesign *::after {
  box-sizing: border-box;
}

/* ===== Tabs ===== */
#profile-redesign .pr-tabs {
  display: flex;
  gap: 6px;
  border: none;
  padding: 0;
  margin: 0 0 0 2px;
  list-style: none;
}
#profile-redesign .pr-tabs .nav-item {
  margin: 0;
}
#profile-redesign .pr-tabs .nav-link {
  border: none;
  background: transparent;
  border-radius: 10px 10px 0 0;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#profile-redesign .pr-tabs .nav-link i {
  font-size: 14px;
}
#profile-redesign .pr-tabs .nav-link:hover {
  color: var(--brand-blue-2);
}
#profile-redesign .pr-tabs .nav-link.active {
  color: var(--brand-blue-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-color: var(--surface);
  position: relative;
  top: 1px;
}
#profile-redesign .pr-tabs .nav-link.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-blue);
  border-radius: 10px 10px 0 0;
}

/* ===== Card / panel ===== */
#profile-redesign .pr-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
#profile-redesign .pr-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
#profile-redesign .pr-section-sub {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 16px;
}
#profile-redesign hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 26px 0 22px;
}

/* ===== Form ===== */
#profile-redesign .pr-grid {
  display: grid;
  gap: 16px;
}
#profile-redesign .pr-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}
#profile-redesign .pr-grid.city-row {
  grid-template-columns: 2fr 1fr 1fr;
}
#profile-redesign .pr-field {
  display: flex;
  flex-direction: column;
}
#profile-redesign .pr-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 6px 2px;
}
#profile-redesign .pr-field label sup {
  color: var(--red);
}
#profile-redesign .pr-field .form-control,
#profile-redesign .pr-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#profile-redesign .pr-field .form-control::placeholder {
  color: var(--ink-3);
}
#profile-redesign .pr-field .form-control:focus,
#profile-redesign .pr-field input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.14);
}
#profile-redesign .profile-form-error-message {
  font-weight: 400;
  font-size: 12px;
  color: var(--red);
  margin: 5px 0 0 2px;
}

/* ===== Buttons ===== */
#profile-redesign .pr-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
#profile-redesign .pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
#profile-redesign .pr-btn-primary {
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 180, 255, 0.28);
}
#profile-redesign .pr-btn-primary:hover {
  filter: brightness(1.04);
}
#profile-redesign .pr-btn-success {
  background: var(--grad-green);
  color: #04261e;
  box-shadow: 0 6px 16px rgba(44, 221, 155, 0.28);
}
#profile-redesign .pr-btn-ghost {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
#profile-redesign .pr-btn:disabled,
#profile-redesign .pr-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

/* ===== Notice banner (amber, themed) ===== */
#profile-redesign .pr-notice {
  display: flex;
  gap: 12px;
  background: rgba(255, 184, 92, 0.1);
  border: 1px solid rgba(255, 184, 92, 0.4);
  border-left: 3px solid var(--amber);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
#profile-redesign .pr-notice .pr-notice-ic {
  flex: 0 0 auto;
  color: #c77f1a;
  font-size: 18px;
  margin-top: 1px;
}
#profile-redesign .pr-notice .pr-notice-body {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
#profile-redesign .pr-notice .pr-notice-body b {
  color: var(--ink);
}
#profile-redesign .pr-notice .pr-notice-body .note {
  margin-top: 8px;
  display: block;
}

/* ===== Additional emails — responsive list (cards on mobile) ===== */
#profile-redesign .pr-email-add {
  margin-bottom: 16px;
}
#profile-redesign .pr-email-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
#profile-redesign .pr-et-head,
#profile-redesign .pr-et-row {
  display: grid;
  grid-template-columns: 70px 1fr 80px 80px 90px 80px 80px;
  align-items: center;
  gap: 6px;
}
#profile-redesign .pr-et-head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
#profile-redesign .pr-et-head .col-name {
  text-align: left;
}
#profile-redesign .pr-et-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
#profile-redesign .pr-et-row:last-child {
  border-bottom: none;
}
#profile-redesign .pr-et-row .cell {
  display: flex;
  justify-content: center;
}
#profile-redesign .pr-et-row .cell.name {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}
#profile-redesign .pr-et-row .cell.name .nm {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#profile-redesign .pr-et-row .cell.name .em {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#profile-redesign .pr-et-row .cell .mobile-label {
  display: none;
}
#profile-redesign .pr-et-row .cell.actions {
  gap: 14px;
}
#profile-redesign .pr-et-row .cell.actions i {
  cursor: pointer;
  font-size: 15px;
}
#profile-redesign .pr-et-row .cell.actions .edit {
  color: var(--brand-blue-2);
}
#profile-redesign .pr-et-row .cell.actions .del {
  color: var(--red);
}
#profile-redesign .pr-empty {
  padding: 22px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
/* themed switch */
#profile-redesign .form-check-input {
  width: 38px;
  height: 21px;
  cursor: pointer;
}
#profile-redesign .form-check-input:checked {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}
#profile-redesign .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(54, 190, 166, 0.2);
  border-color: var(--brand-green);
}

/* ===== Login tab — option cards ===== */
#profile-redesign .pr-login-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
}
#profile-redesign .pr-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
#profile-redesign .pr-option:last-child {
  margin-bottom: 0;
}
#profile-redesign .pr-option .pr-opt-ic {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--grad-blue);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(0, 180, 255, 0.28);
}
#profile-redesign .pr-option .pr-opt-main {
  flex: 1 1 auto;
  min-width: 0;
}
#profile-redesign .pr-option .pr-opt-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
#profile-redesign .pr-option .pr-opt-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 4px 0 12px;
}
#profile-redesign .pr-option .pr-opt-desc .email-chip {
  font-weight: 700;
  color: var(--brand-blue-2);
  background: rgba(0, 180, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ===== Modals (themed) ===== */
#profile-redesign .modal-content,
.pr-modal .modal-content {
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.28);
  font-family: "Montserrat", sans-serif;
}
.pr-modal .modal-header {
  background: var(--surface-2, #f7f9fc);
  border-bottom: 1px solid var(--line, #e7ecf3);
  padding: 16px 20px;
}
.pr-modal .modal-title,
.pr-modal #modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2a37;
  text-shadow: none;
}
.pr-modal .modal-body {
  padding: 20px;
  color: #1f2a37;
}
.pr-modal .modal-body label {
  font-size: 12px;
  font-weight: 600;
  color: #5b6b7f;
  margin-bottom: 6px;
}
.pr-modal .modal-body .form-control {
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
}
.pr-modal .modal-body .form-control:focus {
  outline: none;
  border-color: #00b4ff;
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.14);
}
.pr-modal .pr-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #f0f3f8;
  font-size: 14px;
  font-weight: 500;
  color: #1f2a37;
}
.pr-modal .pr-toggle-row:last-child {
  border-bottom: none;
}
.pr-modal .modal-footer {
  border-top: 1px solid #e7ecf3;
  padding: 14px 20px;
}

/* ----- Password modal: override the legacy global input styling
   (#change_or_add_password_modal input -> borderless light-blue box) so the
   fields match the themed inputs, and move the show/hide eye to the right. ----- */
#change_or_add_password_modal .modal-body label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5b6b7f;
  margin: 0 0 6px 2px;
}
#change_or_add_password_modal input {
  border: 1px solid #d8e0ea;
  background-color: #fff;
  border-radius: 10px;
  padding: 11px 42px 11px 14px;   /* room for the eye on the right */
  font-size: 14px;
  color: #1f2a37;
  width: 100%;
}
#change_or_add_password_modal input:focus {
  outline: none;
  border-color: #00b4ff;
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.14);
}
#change_or_add_password_modal input::placeholder {
  color: #8a99ad;
}
/* reposition the eye toggle to the right edge, vertically centered on the input */
#change_or_add_password_modal .show-password-eye {
  left: auto;
  right: 14px;
  top: 35px;
  color: #8a99ad;
  z-index: 6;
}
#change_or_add_password_modal .show-password-eye:hover {
  color: #2b9cd3;
}
/* password strength meter + helper text spacing */
#change_or_add_password_modal ng-password-meter {
  display: block;
  margin-top: 8px;
}
#change_or_add_password_modal .error-message {
  font-size: 12px;
  color: #e8533a;
  margin-top: 4px;
}
#change_or_add_password_modal .error-message ul {
  margin: 0;
  padding-left: 18px;
}

/* ===== Responsive ===== */
@media (max-width: 680px) {
  #profile-redesign .pr-content {
    padding: 18px 16px;
  }
  #profile-redesign .pr-grid.cols-2,
  #profile-redesign .pr-grid.city-row {
    grid-template-columns: 1fr;
  }
  #profile-redesign .pr-btn-row .pr-btn {
    flex: 1 1 auto;
  }
  /* email table -> stacked cards */
  #profile-redesign .pr-et-head {
    display: none;
  }
  #profile-redesign .pr-et-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin: 10px;
  }
  #profile-redesign .pr-et-row .cell.name {
    grid-column: 1 / -1;
  }
  #profile-redesign .pr-et-row .cell {
    justify-content: space-between;
    align-items: center;
  }
  #profile-redesign .pr-et-row .cell .mobile-label {
    display: inline;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
  }
  #profile-redesign .pr-et-row .cell.actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  #profile-redesign .pr-email-table {
    border: none;
  }
  #profile-redesign .pr-option {
    flex-direction: column;
  }
}
