/* ==========================================================================
   NEXUZ BILLING — login (v2)
   Page-specific styles for views/login.ejs.
   Design tokens and nx2-* components live in public/css/nexuz-v2.css.
   ========================================================================== */

body[data-page="login"] .auth {
  padding-top: clamp(28px, 4.6vw, 62px);
  padding-bottom: clamp(32px, 4.5vw, 60px);
}

/* ================= layout ================= */
.auth__grid {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* ================= editorial intro ================= */
.auth__intro {
  min-width: 0;
  max-width: 640px;
}

.auth__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--t50);
}
.auth__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-300);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, .10);
  animation: nx2pulse 2.4s infinite;
}
.auth__eyebrow-sep {
  color: var(--green-400);
  opacity: .5;
}

.auth__title {
  margin-top: 16px;
  font-family: var(--display);
  font-size: clamp(38px, 5.3vw, 66px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.05em;
  color: var(--t100);
}
.auth__title em {
  font-style: normal;
  color: var(--green-300);
}

.auth__lead {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--t60);
}

.auth__points {
  margin: clamp(26px, 3.6vw, 42px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.auth__point {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.auth__point-num {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--green-300);
  opacity: .85;
}
.auth__point-body {
  display: block;
  min-width: 0;
}
.auth__point-body b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--t80);
}
.auth__point-body span {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--t40);
}

.auth__secure {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
  max-width: 44ch;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--t25);
}
.auth__secure .nx2-icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: var(--green-400);
  opacity: .8;
}

/* ================= auth card ================= */
.auth__card {
  position: relative;
  justify-self: end;
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(165deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012) 55%, rgba(74, 222, 128, .02));
  box-shadow: 0 40px 90px -60px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .03);
  overflow: hidden;
}
.auth__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(134, 239, 172, .55), transparent);
}
.auth__card-glow {
  position: absolute;
  top: -130px;
  right: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, .16), transparent 68%);
  pointer-events: none;
}

.auth__card-head {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.auth__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.auth__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-300);
  white-space: nowrap;
}
.auth__kicker::before {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.auth__card-tag {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--t25);
  white-space: nowrap;
}
.auth__card-head h2 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(23px, 2.4vw, 27px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.auth__accent {
  color: var(--green-300);
}
.auth__card-head p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--t50);
}

/* ================= alerts ================= */
.auth__alert {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 12.5px;
  line-height: 1.5;
}
.auth__alert-icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: none;
}
.auth__alert-body {
  display: block;
  min-width: 0;
}
.auth__alert-body b {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.auth__alert-sub {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  opacity: .78;
  overflow-wrap: anywhere;
}
.auth__alert--error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .26);
  background: linear-gradient(150deg, rgba(127, 29, 29, .22), rgba(127, 29, 29, .08));
}
.auth__alert--error .auth__alert-icon {
  color: #fca5a5;
}
.auth__alert--success {
  color: var(--green-200);
  border-color: var(--ring);
  background: var(--pill);
}
.auth__alert--success .auth__alert-icon {
  color: var(--green-300);
}

/* ================= form ================= */
.auth__form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.auth__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--t50);
}
.auth__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.auth__label-link {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--green-300);
  opacity: .85;
  white-space: nowrap;
  transition: var(--smooth);
}
.auth__label-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth__input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(4, 8, 6, .55);
  color: var(--t100);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.2;
  transition: var(--smooth);
  -webkit-appearance: none;
  appearance: none;
}
.auth__input::placeholder {
  color: var(--t25);
}
.auth__input:hover {
  border-color: rgba(255, 255, 255, .14);
}
.auth__input:focus {
  outline: 0;
  border-color: rgba(134, 239, 172, .5);
  background: rgba(4, 8, 6, .78);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, .10);
}
.auth__input.is-invalid {
  border-color: rgba(248, 113, 113, .55);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .10);
}
.auth__input.is-invalid:focus {
  border-color: rgba(248, 113, 113, .7);
}

.auth__pass {
  position: relative;
  min-width: 0;
}
.auth__input--pass {
  padding-right: 50px;
}
.auth__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 38px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--t40);
  transition: var(--smooth);
}
.auth__toggle .nx2-icon {
  width: 17px;
  height: 17px;
}
.auth__toggle:hover {
  color: var(--green-300);
  background: var(--surface);
}
.auth__toggle:focus-visible {
  outline: 1px solid var(--ring-hi);
  outline-offset: 1px;
}

.auth__submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  font-size: 14px;
}
.auth__submit .nx2-icon {
  width: 16px;
  height: 16px;
}
.auth__submit:disabled {
  opacity: .72;
  cursor: progress;
  transform: none;
  box-shadow: none;
}
.auth__submit[aria-busy="true"] {
  gap: 10px;
}
.auth__spinner {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(6, 19, 11, .28);
  border-top-color: #06130b;
  animation: authspin .7s linear infinite;
}
@keyframes authspin {
  to { transform: rotate(360deg); }
}

/* ================= divider + alt auth ================= */
.auth__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--t25);
}
.auth__or::before,
.auth__or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.auth__or span {
  flex: none;
}

.auth__alt-form {
  display: block;
}
.auth__alt {
  width: 100%;
  height: 44px;
  font-size: 13px;
}
.auth__alt .nx2-icon {
  width: 16px;
  height: 16px;
  color: var(--green-300);
  stroke-width: 1.8;
}

/* ================= secondary links ================= */
.auth__secondary {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.auth__register {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--t50);
}
.auth__register a {
  color: var(--green-300);
  font-weight: 600;
  transition: var(--smooth);
}
.auth__register a:hover {
  color: var(--green-200);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth__forgot-form {
  display: inline-flex;
}
.auth__link-btn {
  padding: 2px 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--t60);
  transition: var(--smooth);
}
.auth__link-btn:hover {
  color: var(--green-300);
}

.auth__card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t25);
}
.auth__foot-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green-400);
  box-shadow: 0 0 8px rgba(74, 222, 128, .6);
}

/* ================= motion ================= */
@media (prefers-reduced-motion: no-preference) {
  .auth__intro {
    animation: authIn .55s cubic-bezier(.215, .61, .355, 1) both;
  }
  .auth__card {
    animation: authIn .55s cubic-bezier(.215, .61, .355, 1) .08s both;
  }
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ================= responsive ================= */
@media (max-width: 960px) {
  .auth__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 620px;
    gap: 30px;
  }
  .auth__intro {
    max-width: 100%;
  }
  .auth__title {
    font-size: clamp(36px, 8vw, 52px);
  }
  .auth__card {
    justify-self: stretch;
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  body[data-page="login"] .auth {
    padding-top: 22px;
    padding-bottom: 28px;
  }
  .auth__grid {
    gap: 24px;
  }
  .auth__title {
    margin-top: 14px;
    font-size: clamp(33px, 10.5vw, 44px);
  }
  .auth__lead {
    margin-top: 14px;
    font-size: 13.5px;
  }
  .auth__points,
  .auth__secure {
    display: none;
  }
  .auth__card {
    padding: 18px;
    border-radius: 14px;
    max-width: none;
  }
  .auth__input {
    font-size: 16px;
  }
  .auth__card-foot {
    display: none;
  }
}

@media (max-width: 400px) {
  .auth__label-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .auth__secondary {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .auth__card-tag {
    display: none;
  }
}
