.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(35, 48, 72, 0.18);
  z-index: 999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.reset-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 360px; max-width: 95vw;
  border-radius: 16px;
  box-shadow: 0 8px 36px rgba(51,78,123,0.13);
  padding: 34px 26px 24px 26px;
  z-index: 1000;
  animation: fadeInUp 0.38s cubic-bezier(.24,.89,.52,1.12);
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translate(-50%, -44%) scale(.97);}
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1);}
}

.close-btn {
  position: absolute; right: 18px; top: 16px;
  border: none; background: none;
  font-size: 1.45rem;
  color: #7b8794;
  cursor: pointer; padding: 3px 7px;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
}
.close-btn:hover { background: #e6edf5;}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}
.modal-header svg { margin-bottom: 8px; }
.modal-header h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  color: #30547e;
  letter-spacing: -0.5px;
}
.modal-desc {
  font-size: 1rem;
  color: #6a7889;
  margin-top: 8px;
  text-align: center;
  margin-bottom: 0;
  line-height: 1.5;
}

.input-group {
  display: flex;
  align-items: center;
  border: 1.6px solid #e4e8f0;
  border-radius: 12px;
  background: #f6f8fb;
  padding: 0 14px;
  height: 50px;
  box-sizing: border-box;
  transition: border 0.2s, background 0.2s;
  gap: 10px;
  letter-spacing: 0.03em;
}
.input-group:focus-within {
  border-color: #3490dc;
  background: #fff;
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px; width: 26px; min-width: 26px;
  color: #8ea0b7;
  flex-shrink: 0;
}
.input-icon svg {
  display: block;
  height: 22px; width: 22px;
}

.input-email {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: #2e3a4c;
  padding: 0 2px;
  height: 38px;
  line-height: 38px;
  box-sizing: border-box;
  font-family: inherit;
}
.input-email::placeholder {
  color: #b2bdcd;
  opacity: 1;
  font-weight: 400;
}

.submit-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 16px;
  margin-top: 10px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #056546;
  color: #fff;
  transition: background 0.18s, box-shadow 0.16s;
  box-shadow: 0 2px 8px rgba(5,101,70,0.06);
}
.submit-btn:hover {
  background: #0f8d63;
}

/* --- Reset message tối ưu --- */
.reset-message {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: #e9fbe6;
  color: #137a31;
  font-size: 0.81rem;
  border: 1.5px solid #bcefc7;
  border-radius: 9px;
  padding: 13px 18px 13px 15px;
  margin: 0 0 6px 0;
  box-shadow: 0 2px 12px rgba(38,160,61,0.07);
  opacity: 0;
  transform: translateY(20px) scale(.96);
  min-height: 44px;
  pointer-events: none;
  text-align: left;
  transition:
    opacity 0.45s cubic-bezier(.43,1.54,.52,1),
    transform 0.35s cubic-bezier(.26,1.18,.51,1),
    box-shadow 0.19s;
}
.reset-message .msg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 100%;
  font-size: 1.15rem;
  margin: 0;
}
.reset-message .msg-text {
  display: block;
  text-align: left;
  line-height: 1.55;
  padding-top: 1px;
  font-weight: 500;
  word-break: break-word;
}
.reset-message.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  box-shadow: 0 6px 28px rgba(41,160,61,0.09);
}
.reset-message.error {
  background: #fff4f2;
  color: #d24529;
  border: 1.5px solid #ffddd2;
  box-shadow: 0 2px 14px rgba(238,84,54,0.07);
}

/* Form hiệu ứng ẩn mượt */
#reset-popup-form.hide {
  opacity: 0;
  transform: translateY(-14px) scale(0.97);
  pointer-events: none;
  height: 0;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: block; /* Giữ block để transition mượt, KHÔNG dùng none luôn */
  transition:
    opacity 0.35s,
    transform 0.34s,
    height 0.35s,
    max-height 0.35s,
    min-height 0.35s,
    margin 0.32s,
    padding 0.32s;
}
#reset-popup-form {
  transition:
    opacity 0.35s,
    transform 0.34s,
    height 0.35s,
    max-height 0.35s,
    min-height 0.35s,
    margin 0.32s,
    padding 0.32s;
}