/* ========================================================
   News It Approved Authentication Screens (Sign In, Create Account & Reset)
   Unified Crimson + Custom "N" Emblem + Floating White Card
   ======================================================== */

.nh-newsit-auth-page {
  background: var(--panel, #f5f6f8);
  min-height: 100%;
  position: relative;
  padding-bottom: 92px;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* 1. Curved Dot-Matrix Crimson Hero */
.nh-newsit-auth-header {
  position: relative;
  height: 224px;
  background: radial-gradient(circle at 50% 24%, #e51620 0%, #a5060b 58%, #6d0307 100%);
  border-radius: 0 0 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px 40px;
  box-sizing: border-box;
  overflow: hidden;
}

.nh-newsit-auth-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.85), transparent 76%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.85), transparent 76%);
  pointer-events: none;
}

.nh-auth-corner-left {
  position: absolute;
  top: -70px;
  left: -95px;
  width: 115px;
  height: 280px;
  background: rgba(154, 0, 9, 0.72);
  transform: rotate(29deg);
  pointer-events: none;
}

.nh-auth-corner-right {
  position: absolute;
  right: -74px;
  bottom: -64px;
  width: 105px;
  height: 164px;
  background: rgba(161, 0, 9, 0.72);
  transform: rotate(31deg);
  pointer-events: none;
}

.nh-newsit-auth-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.nh-auth-nav-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.nh-auth-nav-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.24);
}
.nh-auth-nav-btn svg {
  width: 22px;
  height: 22px;
}

.nh-auth-tagline-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Center Custom N Emblem & Wordmark */
.nh-newsit-brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 10;
}

.nh-auth-emblem-ring {
  padding: 5px;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.nh-auth-logo-mark {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 15px;
}

.nh-auth-wordmark {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1.05;
}

.nh-wordmark-news {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.7px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.nh-wordmark-it-accent {
  font-size: 26px;
  font-weight: 900;
  color: #ffd5d5;
  letter-spacing: -0.7px;
}

.nh-auth-logo-line {
  width: 40px;
  height: 3px;
  background: #ffe066;
  border-radius: 3px;
}

/* 2. Elevated Floating White Card */
.nh-newsit-auth-card {
  position: relative;
  z-index: 15;
  margin: -30px 14px 16px;
  padding: 20px 16px 18px;
  background: var(--paper, #ffffff);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.11);
  border: 1px solid var(--stroke, #f0f0f2);
}

.nh-auth-title-row {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink, #101010);
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.nh-auth-subtext {
  text-align: center;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted, #5b5b62);
  margin: 0 0 18px;
}

/* 3. Form Input Groups */
.nh-auth-input-group {
  display: flex;
  align-items: center;
  height: 46px;
  background: var(--panel, #f6f7f9);
  border: 1.5px solid var(--stroke, #e6e7ec);
  border-radius: 13px;
  padding: 0 12px;
  margin-bottom: 11px;
  box-sizing: border-box;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.nh-auth-input-group:focus-within {
  border-color: #be080d;
  background: var(--paper, #ffffff);
  box-shadow: 0 0 0 3px rgba(190, 8, 13, 0.11);
}

.nh-auth-input-icon {
  width: 19px;
  height: 19px;
  flex: none;
  margin-right: 10px;
  stroke: #555555;
}

.nh-auth-input-field {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink, #101010);
}

.nh-auth-eye-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nh-auth-eye-btn svg {
  width: 19px;
  height: 19px;
  stroke: #666666;
}

.nh-auth-forgot-row {
  text-align: right;
  margin: -3px 2px 12px;
}
.nh-auth-forgot-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #be080d;
  background: transparent;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
}

#nh-auth-error {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #be080d;
  min-height: 0;
}
#nh-auth-error:empty {
  display: none;
}

/* 4. Primary Gradient Crimson CTA */
.nh-auth-primary-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #e1141e, #b1060b);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(190, 8, 13, 0.28);
  transition: transform 0.14s ease, opacity 0.14s ease;
}
.nh-auth-primary-btn:active {
  transform: scale(0.98);
}
.nh-auth-primary-btn:disabled {
  opacity: 0.6;
}
.nh-auth-primary-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.nh-auth-terms-note {
  margin-top: 13px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted, #666);
  line-height: 1.45;
}
.nh-auth-terms-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nh-auth-terms-link {
  color: #be080d;
  font-weight: 700;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nh-auth-reset-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffeded;
  border: 1px solid #ffd5d5;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.45;
}

/* 5. Social Sign-In */
.nh-auth-social-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
}
.nh-auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--stroke, #e7e7e7);
}
.nh-auth-divider-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #777);
}

.nh-auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nh-auth-social-btn {
  height: 44px;
  border-radius: 13px;
  border: 1.5px solid var(--stroke, #e6e7ec);
  background: var(--paper, #ffffff);
  color: var(--ink, #1f1f1f);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.nh-auth-social-btn:active {
  transform: scale(0.98);
}
.nh-social-icon {
  width: 19px;
  height: 19px;
  flex: none;
}

/* 6. Bottom Footer & Benefits */
.nh-auth-footer-wrap {
  padding: 2px 16px 18px;
  text-align: center;
}
.nh-auth-switch-row {
  font-size: 13px;
  color: var(--muted, #5b5b62);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nh-auth-switch-btn {
  color: #be080d;
  font-weight: 800;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  cursor: pointer;
}
.nh-auth-benefits-strip {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted, #666);
}

/* Dark Mode Support */
body.dark .nh-newsit-auth-page {
  background: #121316;
}
body.dark .nh-newsit-auth-card {
  background: #1c1d21;
  border-color: #2f3137;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
body.dark .nh-auth-input-group {
  background: #25272d;
  border-color: #363942;
}
body.dark .nh-auth-input-icon,
body.dark .nh-auth-eye-btn svg {
  stroke: #b5b7bf;
}
body.dark .nh-auth-social-btn {
  background: #25272d;
  border-color: #363942;
  color: #f3f4f6;
}
body.dark .nh-auth-reset-note {
  background: rgba(190, 8, 13, 0.16);
  border-color: rgba(233, 19, 28, 0.35);
  color: #fecaca;
}
