/* ==========================================================================
   SAIFNEX — auth pages (login, forgot password, set password)
   Requires core.css.
   ========================================================================== */

body.auth {
  overflow: auto;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
}

.auth__card {
  width: min(440px, 100%);
  padding: clamp(26px, 5vw, 40px);
  border-radius: 22px;
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
}
.auth__brand img.mark { height: 36px; width: auto; }
.auth__brand .stack { display: grid; gap: 3px; }
.auth__brand .word { height: 14px; width: auto; }
.auth__brand .word--light { display: none; }
[data-theme="light"] .auth__brand .word--dark { display: none; }
[data-theme="light"] .auth__brand .word--light { display: block; }
.auth__brand .sub {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 27px);
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.auth__lead {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
}

.auth__form { display: grid; gap: 14px; }

.auth__form .field { display: grid; gap: 6px; }
.auth__form .field > span {
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.auth__form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.auth__form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.16); }
.auth__form input[aria-invalid="true"] { border-color: #F87171; }

/* Password field with a reveal toggle */
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw__eye {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--text-dim);
}
.pw__eye:hover { color: var(--text); background: var(--panel); }
.pw__eye svg { width: 17px; height: 17px; }

.auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.auth__check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); cursor: pointer; }
.auth__check input { width: 15px; height: 15px; accent-color: var(--blue); }

.auth__link { color: var(--accent); font-weight: 500; text-decoration: none; }
.auth__link:hover { text-decoration: underline; }

.auth__form .btn { width: 100%; padding: 13px 18px; }

.auth__foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

/* ---- Inline messages ---- */
.note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid var(--edge);
  background: var(--panel-2);
  color: var(--text-soft);
}
.note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.note--error { border-color: rgba(248,113,113,.4); color: #F87171; }
.note--ok { border-color: rgba(34,197,94,.35); color: #34D399; }
.note[hidden] { display: none; }

/* ---- Password strength ---- */
.strength { display: grid; gap: 8px; }
.strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.strength__bars i {
  height: 4px;
  border-radius: 4px;
  background: var(--panel-2);
  transition: background .3s var(--ease);
}
.strength[data-level="1"] .strength__bars i:nth-child(-n+1) { background: #F87171; }
.strength[data-level="2"] .strength__bars i:nth-child(-n+2) { background: #FBBF24; }
.strength[data-level="3"] .strength__bars i:nth-child(-n+3) { background: #38BDF8; }
.strength[data-level="4"] .strength__bars i { background: #34D399; }
.strength__label { font-size: 12px; color: var(--text-dim); }

.reqs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.reqs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.reqs li::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.reqs li.is-met { color: #34D399; }
.reqs li.is-met::before {
  border-color: #34D399;
  background: #34D399;
  box-shadow: inset 0 0 0 2px var(--bg);
}

/* ---- Success panel ---- */
.done { display: grid; gap: 14px; justify-items: center; text-align: center; }
.done__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, .14);
  color: #34D399;
}
.done__icon svg { width: 26px; height: 26px; }

.auth__theme {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 6;
}

@media (max-width: 420px) {
  .auth__card { padding: 24px 20px; border-radius: 18px; }
}
