/* Nevilo — professional sign-in / register */

@keyframes nevilo-auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nevilo-auth-sheen {
  0%, 100% { transform: translateX(120%); }
  45%, 55% { transform: translateX(-120%); }
}

@keyframes nevilo-auth-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

body.nevilo-auth-body {
  overflow: auto;
}

.nevilo-auth-body .device {
  height: min(874px, calc(100dvh - 1.5rem));
  background: var(--surface);
}

.nevilo-auth-body .device .ambient {
  background:
    radial-gradient(360px 220px at 88% 4%, rgba(12, 116, 105, 0.18), transparent 62%),
    radial-gradient(300px 200px at 0% 42%, rgba(194, 82, 61, 0.07), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.72) 0%, transparent 28%);
}

.nevilo-auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  z-index: 2;
}

.nevilo-auth__topbar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(46px + var(--safe-t)) 1.15rem 0.35rem;
}

.nevilo-auth__topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.nevilo-auth__topbar-name {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.nevilo-auth__topbar-name span {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.1rem;
}

.nevilo-auth__lang {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

.nevilo-auth__lang .app-nevilo-lang__btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.nevilo-auth__lang .app-nevilo-lang__flag {
  width: 22px;
  height: 22px;
}

html[data-nevilo-theme="dark"] .nevilo-auth__lang .app-nevilo-lang__btn {
  background: rgba(255, 255, 255, 0.05);
}

.nevilo-auth__scroll {
  flex: 1;
  overflow: auto;
  padding: 0.35rem 1.15rem calc(1.35rem + var(--safe-b));
  scroll-behavior: smooth;
}

.nevilo-auth__scroll::-webkit-scrollbar { width: 0; }

.nevilo-auth__hero {
  text-align: center;
  margin-bottom: 1.1rem;
  animation: nevilo-auth-rise 0.55s var(--ease-out) both;
}

.nevilo-auth__topbar-brand .nevilo-auth__mark {
  width: 60px;
  height: 60px;
  margin: 0;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.nevilo-auth__mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nevilo-auth__phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(12, 116, 105, 0.08);
  border: 1px solid rgba(12, 116, 105, 0.14);
  color: var(--teal-deep);
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.nevilo-auth__phase-badge svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nevilo-auth__heading {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  line-height: 1.25;
}

.nevilo-auth__intro {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 22rem;
  margin: 0 auto;
}

.nevilo-auth__intro .app-auth-masked-phone {
  color: var(--ink-soft);
  font-weight: 700;
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline-block;
}

.nevilo-auth__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1rem auto 0;
  max-width: 16rem;
}

.nevilo-auth__step {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(7, 20, 18, 0.08);
  overflow: hidden;
  position: relative;
}

.nevilo-auth__step.is-active,
.nevilo-auth__step.is-done {
  background: rgba(12, 116, 105, 0.14);
}

.nevilo-auth__step.is-active::after,
.nevilo-auth__step.is-done::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #149487);
}

.nevilo-auth__step.is-active::after {
  animation: nevilo-auth-pulse 1.8s ease infinite;
}

.nevilo-auth__card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  padding: 1.25rem 1.05rem 1.15rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 22px 48px rgba(8, 30, 26, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  animation: nevilo-auth-rise 0.65s var(--ease-out) 0.08s both;
}

.nevilo-auth__card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.nevilo-auth__card-head-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal-deep);
  flex-shrink: 0;
}

.nevilo-auth__card-head-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nevilo-auth__card-head-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.nevilo-auth__card-head-text span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.nevilo-auth-field {
  margin-bottom: 0.95rem;
}

.nevilo-auth-field label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.42rem;
  letter-spacing: 0.01em;
}

.nevilo-auth-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0.82rem 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  background: rgba(246, 249, 248, 0.92);
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.nevilo-auth-field input::placeholder {
  color: var(--muted-2);
  opacity: 0.85;
}

.nevilo-auth-field input:focus {
  outline: none;
  border-color: rgba(12, 116, 105, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(12, 116, 105, 0.1);
}

.nevilo-auth-field--icon {
  position: relative;
}

.nevilo-auth-field--icon input {
  padding-inline-start: 2.65rem;
}

.nevilo-auth-field__icon {
  position: absolute;
  inset-inline-start: 0.95rem;
  top: 2.28rem;
  width: 1.05rem;
  height: 1.05rem;
  opacity: 0.42;
  pointer-events: none;
  stroke: var(--teal-deep);
  fill: none;
  stroke-width: 1.8;
}

.nevilo-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.nevilo-auth-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted-2);
  text-align: center;
  margin: -0.2rem 0 1rem;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  background: rgba(12, 116, 105, 0.05);
  border: 1px dashed rgba(12, 116, 105, 0.14);
}

.nevilo-auth-hint svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.nevilo-auth-btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 0.88rem 1rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease), opacity 0.14s var(--ease);
}

.nevilo-auth-btn--primary {
  background: linear-gradient(145deg, #129688 0%, var(--teal-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(12, 116, 105, 0.32);
  position: relative;
  overflow: hidden;
}

.nevilo-auth-btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.14) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.45s var(--ease);
}

.nevilo-auth-btn--primary:hover::after {
  transform: translateX(120%);
}

.nevilo-auth-btn--primary:active {
  transform: scale(0.985);
}

.nevilo-auth-btn--ghost {
  background: transparent;
  color: var(--teal);
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.55rem;
}

.nevilo-auth-btn--secondary {
  background: var(--teal-soft);
  color: var(--teal-deep);
  margin-top: 0.55rem;
  box-shadow: none;
  border: 1px solid rgba(12, 116, 105, 0.12);
}

.nevilo-auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.35rem;
}

.nevilo-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  transition: background 0.15s var(--ease);
}

.nevilo-auth-link:hover {
  background: rgba(12, 116, 105, 0.07);
}

.nevilo-auth-back {
  text-align: center;
  margin-top: 1.1rem;
  animation: nevilo-auth-rise 0.7s var(--ease-out) 0.14s both;
}

.nevilo-auth-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.nevilo-auth-back a svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nevilo-auth-referral-note {
  margin-top: 0.95rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(176, 125, 31, 0.08);
  border: 1px solid rgba(176, 125, 31, 0.14);
}

.nevilo-auth-trust {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  animation: nevilo-auth-rise 0.75s var(--ease-out) 0.18s both;
}

.nevilo-auth-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted-2);
}

.nevilo-auth-trust__item svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2;
}

.nevilo-auth-otp-stage {
  text-align: center;
}

.nevilo-auth-otp-stage .nevilo-auth__intro {
  margin-bottom: 0.85rem;
}

.nevilo-auth-otp-boxes {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.85rem 0 1.15rem;
  direction: ltr;
}

.nevilo-auth-otp-digit {
  width: 2.65rem;
  height: 3.15rem;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: rgba(246, 249, 248, 0.95);
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--display);
  color: var(--ink-soft);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.12s var(--ease);
}

.nevilo-auth-otp-digit:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(12, 116, 105, 0.12);
  transform: translateY(-1px);
}

.nevilo-auth-otp-resend-wrap {
  margin-top: 0.85rem;
}

.nevilo-auth-otp-resend-countdown {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.nevilo-auth-access-help {
  margin-top: 1.35rem;
  text-align: center;
}

.nevilo-auth-access-help.app-auth-access-help-wrap {
  margin-bottom: 0;
}

.app-auth-access-help-btn.nevilo-auth-access-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0.35rem 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.15s var(--ease), opacity 0.15s var(--ease);
}

.app-auth-access-help-btn.nevilo-auth-access-help-btn:hover,
.app-auth-access-help-btn.nevilo-auth-access-help-btn:focus {
  transform: none;
  box-shadow: none;
  outline: none;
}

.app-auth-access-help-btn.nevilo-auth-access-help-btn:hover .app-auth-access-help-btn__label,
.app-auth-access-help-btn.nevilo-auth-access-help-btn:focus .app-auth-access-help-btn__label {
  color: #0a5f56;
}

.app-auth-access-help-btn__label {
  font: 600 0.84rem/1.5 "Vazirmatn", Tahoma, sans-serif;
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-auth-access-help-btn__img {
  display: block;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  object-fit: cover;
}

.nevilo-auth-sheet {
  z-index: 140;
}

.nevilo-auth-sheet .lang-sheet__panel {
  max-height: min(88dvh, 520px);
}

.nevilo-auth-sheet-error {
  color: var(--coral);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.nevilo-auth-alert {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.nevilo-auth-alert--error {
  color: #8f2d22;
  background: rgba(194, 82, 61, 0.12);
  border: 1px solid rgba(194, 82, 61, 0.22);
}

.nevilo-auth-alert--warn {
  color: #7a5716;
  background: rgba(196, 146, 42, 0.14);
  border: 1px solid rgba(196, 146, 42, 0.24);
}

html[data-nevilo-theme="dark"] .nevilo-auth-alert--error {
  color: #ffb4a8;
  background: rgba(194, 82, 61, 0.18);
}

html[data-nevilo-theme="dark"] .nevilo-auth-alert--warn {
  color: #f0d08a;
  background: rgba(196, 146, 42, 0.16);
}

/* Snackbar */
.app-auth-snackbar-live {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + var(--safe-b));
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), var(--app-w));
  z-index: 200;
  border-radius: 18px;
  padding: 0.85rem 1rem 0.65rem;
  text-align: center;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.app-auth-snackbar-live.bg-yellow-dark { background: linear-gradient(145deg, #c4922a, #b07d1f); }
.app-auth-snackbar-live.bg-red-dark { background: linear-gradient(145deg, #c25545, #a33b2d); }
.app-auth-snackbar-live.bg-green-dark { background: linear-gradient(145deg, #249a7c, #1f8a6e); }

.app-auth-snackbar-live .app-auth-snackbar-title,
.app-auth-snackbar-live .app-auth-snackbar-body {
  color: #fff;
  margin: 0 0 0.35rem;
}

.app-auth-snackbar-dismiss {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

/* Dark theme */
html[data-nevilo-theme="dark"] .nevilo-auth-body .device .ambient {
  background:
    radial-gradient(360px 220px at 88% 4%, rgba(12, 116, 105, 0.22), transparent 62%),
    radial-gradient(300px 200px at 0% 42%, rgba(194, 82, 61, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 28%);
}

html[data-nevilo-theme="dark"] .nevilo-auth__lang .app-nevilo-lang__btn,
html[data-nevilo-theme="dark"] .nevilo-auth-back a {
  background: rgba(255, 255, 255, 0.05);
}

html[data-nevilo-theme="dark"] .nevilo-auth__card {
  background: rgba(16, 31, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-nevilo-theme="dark"] .nevilo-auth-field input,
html[data-nevilo-theme="dark"] .nevilo-auth-otp-digit {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

html[data-nevilo-theme="dark"] .nevilo-auth-field input:focus {
  background: rgba(255, 255, 255, 0.06);
}

html[data-nevilo-theme="dark"] .nevilo-auth-hint {
  background: rgba(12, 116, 105, 0.1);
  border-color: rgba(12, 116, 105, 0.18);
}

/* Developer credit — auth pages */
.nevilo-auth-signin-footer {
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.65rem calc(0.3rem + var(--safe-b));
  text-align: center;
  background: var(--teal-deep);
  border-top: none;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
}

.nevilo-auth-signin-footer__line {
  margin: 0;
  padding: 0;
  font-size: clamp(0.55rem, 2.5vw, 0.65rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.015em;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nevilo-auth-signin-footer__label {
  font-weight: 500;
}

.nevilo-auth-signin-footer__company {
  font-weight: 600;
}

.nevilo-auth-signin-footer__sep {
  margin: 0 0.35rem;
  opacity: 0.75;
}

.nevilo-auth-signin-footer__phones {
  font-weight: 500;
  letter-spacing: 0.02em;
}
