.nd-layout {
  padding-top: 0;
}

.nd-page-content {
  min-height: 100vh;
}

.nd-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--nd-bg);
  color: var(--nd-text);
}

.nd-auth-layout {
  width: min(1080px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--nd-border2);
  border-radius: 8px;
  background: var(--nd-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.nd-auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 48px 42px 34px;
  overflow: hidden;
  background: #1267c7;
  color: #fff;
}

.nd-auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  pointer-events: none;
}

.nd-auth-brand-panel::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -100px;
  width: 260px;
  height: 260px;
  border: 44px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.nd-auth-brand-top,
.nd-auth-brand-content,
.nd-auth-brand-footer {
  position: relative;
  z-index: 1;
}

.nd-auth-brand-top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font: 700 14px var(--nd-mono);
  letter-spacing: 1.5px;
}

.nd-auth-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.nd-auth-brand-mark svg {
  width: 19px;
  height: 19px;
}

.nd-auth-brand-content {
  max-width: 340px;
  margin: auto 0;
  padding: 65px 0;
}

.nd-auth-brand-kicker {
  display: block;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font: 10px var(--nd-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nd-auth-brand-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -1px;
}

.nd-auth-brand-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.75;
}

.nd-auth-brand-points {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.nd-auth-brand-point {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.nd-auth-brand-point span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.nd-auth-brand-point svg {
  width: 13px;
  height: 13px;
}

.nd-auth-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: rgba(255, 255, 255, 0.58);
  font: 9px var(--nd-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nd-auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 50px 64px;
  background: var(--nd-bg2);
}

.nd-auth-panel-inner {
  width: min(440px, 100%);
  margin: auto;
}

.nd-auth-panel-inner-wide {
  width: min(540px, 100%);
}

.nd-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nd-border);
  border-radius: 13px;
  margin: 0 0 26px;
}

.nd-auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 0;
  border-radius: 9px;
  text-decoration: none;
  color: var(--nd-text3);
  font: 600 13px var(--nd-sans);
  transition: all 0.2s;
}

.nd-auth-tab:hover {
  color: var(--nd-text);
  background: rgba(255, 255, 255, 0.05);
}

.nd-auth-tab.active {
  background: var(--nd-green);
  color: var(--nd-bg);
  box-shadow: 0 0 20px rgba(0, 255, 148, 0.3);
}

html.nd-light .nd-auth-tabs {
  background: #eef2f7;
  border-color: #dfe5ee;
}

html.nd-light .nd-auth-tab:hover {
  color: #1f2937;
  background: rgba(0, 0, 0, 0.04);
}

.nd-auth-back {
  position: absolute;
  top: 24px;
  right: 76px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--nd-text3);
  font: 11px var(--nd-mono);
  text-decoration: none;
  transition: color 0.2s;
}

.nd-auth-back:hover {
  color: var(--nd-green);
}

.nd-auth-back svg {
  width: 14px;
  height: 14px;
}

.nd-auth-header {
  margin-bottom: 26px;
}

.nd-auth-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--nd-green);
  font: 10px var(--nd-mono);
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.nd-auth-title {
  margin: 0 0 9px;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.nd-auth-subtitle {
  color: var(--nd-text3);
  font-size: 14px;
  line-height: 1.65;
}

.nd-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.55;
}

.nd-auth-alert-error {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.07);
}

.nd-auth-alert-success {
  color: var(--nd-green);
  border-color: rgba(0, 255, 148, 0.25);
  background: rgba(0, 255, 148, 0.06);
}

.nd-auth-alert-title {
  margin-bottom: 2px;
  font-weight: 700;
}

.nd-auth-alert-msg {
  color: var(--nd-text2);
}

.nd-auth-google {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--nd-border2);
  border-radius: 5px;
  background: var(--nd-surface);
  color: var(--nd-text);
  font: 600 13px var(--nd-sans);
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  text-decoration: none;
}

.nd-auth-google:hover {
  border-color: #4285f4;
  background: rgba(66, 133, 244, 0.06);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.12);
}

.nd-auth-google-letter {
  color: #4285f4;
  font: 700 18px Arial, sans-serif;
}

.nd-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--nd-text3);
  font: 9px var(--nd-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nd-auth-divider::before,
.nd-auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--nd-border);
}

.nd-auth-provider-footer {
  margin-top: 22px;
}

.nd-auth-provider-footer .nd-auth-divider {
  margin: 0 0 14px;
}

.nd-auth-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.nd-auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.nd-auth-field {
  min-width: 0;
}

.nd-auth-label {
  display: block;
  margin-bottom: 7px;
  color: var(--nd-text2);
  font: 600 10px var(--nd-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.nd-auth-input-wrap {
  position: relative;
}

.nd-auth-input-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  display: flex;
  color: var(--nd-text3);
  transform: translateY(-50%);
  pointer-events: none;
}

.nd-auth-input-icon svg {
  width: 15px;
  height: 15px;
}

.nd-auth-input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px 11px 39px;
  border: 1px solid var(--nd-border);
  border-radius: 5px;
  outline: none;
  background: var(--nd-bg);
  color: var(--nd-text);
  font: 13px var(--nd-sans);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.nd-auth-input::placeholder {
  color: var(--nd-text3);
}

.nd-auth-input:focus {
  border-color: var(--nd-green);
  box-shadow: 0 0 0 3px rgba(0, 255, 148, 0.09);
}

.nd-auth-input-wrap:focus-within .nd-auth-input-icon {
  color: var(--nd-green);
}

.nd-auth-field.is-valid .nd-auth-input {
  border-color: rgba(0, 229, 122, 0.78);
  box-shadow: 0 0 0 3px rgba(0, 229, 122, 0.08);
}

.nd-auth-field.is-invalid .nd-auth-input {
  border-color: rgba(248, 113, 113, 0.88);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08);
}

.nd-auth-field.is-valid .nd-auth-input-icon {
  color: var(--nd-green);
}

.nd-auth-field.is-invalid .nd-auth-input-icon {
  color: #f87171;
}

.nd-auth-validation-icon {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 18px;
  height: 18px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font: 700 11px/1 var(--nd-sans);
  transform: translateY(-50%);
  pointer-events: none;
}

.nd-auth-field.is-valid .nd-auth-validation-icon,
.nd-auth-field.is-invalid .nd-auth-validation-icon {
  display: grid;
}

.nd-auth-field.is-valid .nd-auth-validation-icon {
  background: #00b86b;
}

.nd-auth-field.is-valid .nd-auth-validation-icon::before {
  content: "✓";
}

.nd-auth-field.is-invalid .nd-auth-validation-icon {
  background: #ef4444;
}

.nd-auth-field.is-invalid .nd-auth-validation-icon::before {
  content: "!";
}

.nd-auth-live-message {
  min-height: 16px;
  margin: 5px 0 0;
  color: var(--nd-text3);
  font-size: 11px;
  line-height: 1.4;
}

.nd-auth-field.is-valid .nd-auth-live-message {
  color: #00c978;
}

.nd-auth-field.is-invalid .nd-auth-live-message {
  color: #f87171;
}

.nd-auth-input-pad-right {
  padding-right: 42px;
}

.nd-auth-toggle-pwd,
.nd-auth-select-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  display: flex;
  color: var(--nd-text3);
  transform: translateY(-50%);
}

.nd-auth-toggle-pwd {
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nd-auth-toggle-pwd:hover {
  color: var(--nd-green);
}

.nd-auth-select {
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
}

.nd-auth-select-arrow {
  pointer-events: none;
}

.nd-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nd-auth-check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--nd-text2);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.nd-auth-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nd-auth-check-custom {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid var(--nd-border2);
  border-radius: 3px;
  background: var(--nd-bg);
}

.nd-auth-check-input:checked + .nd-auth-check-custom,
.nd-auth-check-input:checked ~ .nd-auth-check-label .nd-auth-check-custom {
  border-color: var(--nd-green);
  background: var(--nd-green);
}

.nd-auth-check-input:checked + .nd-auth-check-custom::after,
.nd-auth-check-input:checked ~ .nd-auth-check-label .nd-auth-check-custom::after {
  content: "";
  width: 4px;
  height: 7px;
  border: 2px solid var(--nd-bg);
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg) translateY(-1px);
}

.nd-auth-link-small,
.nd-auth-inline-link {
  color: var(--nd-green);
  font-size: 11px;
  text-decoration: none;
}

.nd-auth-link-small:hover,
.nd-auth-inline-link:hover {
  text-decoration: underline;
}

.nd-auth-submit {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 0;
  border-radius: 5px;
  background: var(--nd-green);
  color: var(--nd-bg);
  box-shadow: 0 10px 24px rgba(0, 255, 148, 0.18);
  font: 700 13px var(--nd-mono);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.nd-auth-submit:hover:not(:disabled) {
  background: #00e889;
  box-shadow: 0 14px 30px rgba(0, 255, 148, 0.28);
  transform: translateY(-1px);
}

.nd-auth-submit:disabled {
  opacity: 0.68;
  cursor: wait;
}

.nd-auth-submit-inner,
.nd-auth-submit-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nd-auth-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(6, 8, 16, 0.25);
  border-top-color: var(--nd-bg);
  border-radius: 50%;
  animation: nd-auth-spin 0.8s linear infinite;
}

@keyframes nd-auth-spin {
  to { transform: rotate(360deg); }
}

.nd-auth-field-error,
.nd-auth-field-error ul {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
  color: #f87171;
  font-size: 11px;
}

.nd-auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
  color: var(--nd-text3);
  font-size: 12px;
}

.nd-auth-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nd-green);
  font-weight: 600;
  text-decoration: none;
}

.nd-auth-footer-link:hover {
  text-decoration: underline;
}

.nd-pwd-strength-wrap {
  margin-top: 7px;
}

.nd-pwd-strength-bars {
  display: flex;
  gap: 4px;
  height: 3px;
  margin-bottom: 5px;
}

.nd-pwd-bar {
  height: 100%;
  flex: 1;
  border-radius: 2px;
  background: var(--nd-border);
}

.nd-pwd-strength-label {
  color: var(--nd-text3);
  font: 9px var(--nd-mono);
}

.nd-password-guidance {
  padding: 13px 14px;
  border: 1px solid var(--nd-border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--nd-bg2) 76%, transparent);
}

.nd-password-guidance-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--nd-text2);
  font: 600 11px var(--nd-mono);
}

.nd-password-guidance-title svg {
  width: 15px;
  height: 15px;
  color: var(--nd-green);
}

.nd-password-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nd-password-rules li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--nd-text3);
  font-size: 11px;
  line-height: 1.35;
  transition: color .2s;
}

.nd-password-rules li::before {
  content: "";
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 14px;
  border: 1px solid var(--nd-border2);
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  transition: border-color .2s, background .2s;
}

.nd-password-rules li.is-valid {
  color: var(--nd-text2);
}

.nd-password-rules li.is-valid::before {
  content: "✓";
  border-color: #00b86b;
  background: #00b86b;
}

html.nd-light .nd-password-guidance {
  background: rgba(244, 247, 251, .86);
}

@media (max-width: 520px) {
  .nd-password-rules {
    grid-template-columns: 1fr;
  }
}

.nd-page-theme-toggle {
  top: 18px;
  right: 18px;
  z-index: 30;
}

html.nd-light .nd-auth-shell {
  background: #eaf3fb;
}

html.nd-light .nd-auth-layout {
  background: #fff;
  box-shadow: 0 28px 70px rgba(31, 71, 112, 0.18);
}

html.nd-light .nd-auth-panel {
  background: #fff;
}

/* Compact presentation when authentication is opened inside the global modal. */
.nd-auth-shell-modal {
  min-height: 100%;
  padding: 0;
  background: transparent;
}
.nd-auth-shell-modal .nd-auth-layout {
  width: 100%;
  min-height: 100%;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.nd-auth-shell-modal .nd-auth-brand-panel {
  display: none;
}
.nd-auth-shell-modal .nd-auth-panel {
  min-height: 100%;
  padding: 42px 42px 36px;
  background: var(--nd-bg2);
}
.nd-auth-shell-modal .nd-auth-panel-inner {
  width: min(460px, 100%);
}
.nd-auth-shell-modal .nd-auth-back {
  display: none;
}
.nd-auth-shell-modal .nd-auth-header {
  margin-top: 0;
}
.nd-auth-shell-modal .nd-auth-header { margin-bottom: 26px; }
.nd-auth-shell-modal .nd-auth-title { font-size: clamp(24px, 4vw, 30px); }
.nd-auth-shell-modal .nd-auth-form { gap: 18px; }
.nd-auth-shell-modal .nd-auth-provider-footer { margin-top: 24px; }
.nd-auth-shell-modal .nd-auth-footer { margin-top: 22px; }
html.nd-light .nd-auth-shell-modal .nd-auth-panel {
  background: #fff;
}
@media (max-width: 560px) {
  .nd-auth-shell-modal .nd-auth-panel {
    padding: 34px 22px 28px;
  }
}

html.nd-light .nd-auth-input,
html.nd-light .nd-auth-check-custom {
  background: #f4f7fb;
}

html.nd-light .nd-auth-google {
  background: #fff;
}

html.nd-light .nd-auth-select option {
  background: #fff;
  color: var(--nd-text);
}

@media (max-width: 860px) {
  .nd-auth-shell {
    padding: 18px;
  }

  .nd-auth-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .nd-auth-brand-panel {
    min-height: 230px;
    padding: 28px;
  }

  .nd-auth-brand-content {
    max-width: 600px;
    padding: 35px 0 18px;
  }

  .nd-auth-brand-title {
    font-size: 34px;
  }

  .nd-auth-brand-points,
  .nd-auth-brand-footer {
    display: none;
  }

  .nd-auth-panel {
    padding: 50px 34px 38px;
  }
}

@media (max-width: 560px) {
  .nd-auth-shell {
    display: block;
    padding: 0;
  }

  .nd-auth-layout {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .nd-auth-brand-panel {
    min-height: 190px;
    padding: 24px 20px;
  }

  .nd-auth-brand-content {
    padding: 26px 0 4px;
  }

  .nd-auth-brand-title {
    margin-bottom: 10px;
    font-size: 28px;
  }

  .nd-auth-brand-copy {
    font-size: 13px;
    line-height: 1.55;
  }

  .nd-auth-panel {
    min-height: calc(100vh - 190px);
    padding: 54px 20px 32px;
  }

  .nd-auth-back {
    top: 20px;
    right: 72px;
  }

  .nd-auth-grid-2 {
    grid-template-columns: 1fr;
  }

  .nd-auth-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .nd-auth-footer {
    flex-wrap: wrap;
    text-align: center;
  }
}
