/* Terra Design — login / register split auth pages */
.td-auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100vh - 116px);
}

.td-auth--register {
  min-height: calc(100vh - 150px);
}

.td-auth__hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 48px 48px;
  isolation: isolate;
}

.td-auth__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.28) 0%, rgba(8, 8, 8, 0.55) 48%, rgba(8, 8, 8, 0.78) 100%),
    var(--td-auth-hero-image, url("/terra-coming-soon-bg.png")) center / cover no-repeat;
  z-index: -2;
}

.td-auth__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 55%);
  z-index: -1;
  pointer-events: none;
}

.td-auth__hero-title {
  margin: 0 0 12px;
  font-family: var(--td-font-serif);
  font-weight: 500;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  max-width: 14ch;
}

.td-auth__hero-text {
  margin: 0 0 36px;
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 300;
}

.td-auth__benefits {
  display: grid;
  gap: 18px;
}

.td-auth__benefits--4 {
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.td-auth__benefit {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.td-auth__benefit-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.td-auth__benefit-icon svg {
  width: 13px;
  height: 13px;
}

.td-auth__benefit p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  max-width: 28ch;
}

.td-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background: #fff;
}

.td-auth__panel-inner {
  width: 100%;
  max-width: 440px;
}

.td-auth__panel-inner--wide {
  max-width: 520px;
}

.td-auth__title {
  margin: 0 0 10px;
  font-family: var(--td-font-serif);
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--td-ink);
}

.td-auth__subtitle {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--td-muted);
  line-height: 1.55;
}

.td-auth__alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  font-size: 13px;
  border: 1px solid var(--td-line);
  background: var(--td-bg-soft);
}

.td-auth__alert--error {
  border-color: rgba(179, 58, 43, 0.35);
  background: rgba(179, 58, 43, 0.06);
  color: #8f2d22;
}

.td-auth__alert--success {
  border-color: rgba(45, 110, 70, 0.3);
  background: rgba(45, 110, 70, 0.06);
  color: #2d6e46;
}

.td-field {
  margin-bottom: 16px;
}

.td-field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--td-ink-soft);
}

.td-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.td-field__control .td-field__icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--td-muted);
  pointer-events: none;
}

.td-field__control input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--td-line-strong);
  border-radius: var(--td-radius);
  background: #fff;
  padding: 0 44px 0 42px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.td-field__control--plain input {
  padding-left: 14px;
}

.td-field__control input:focus {
  border-color: var(--td-ink);
  box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.08);
}

.td-field__control input::placeholder {
  color: #a8a49c;
}

.td-pw-toggle {
  position: absolute;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--td-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.td-pw-toggle svg {
  width: 16px;
  height: 16px;
}

.td-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.td-auth__forgot {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 18px;
}

.td-auth__forgot a {
  font-size: 12px;
  color: var(--td-ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.td-auth .td-btn {
  width: 100%;
}

.td-auth__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--td-muted);
  font-size: 12px;
}

.td-auth__divider::before,
.td-auth__divider::after {
  content: "";
  height: 1px;
  background: var(--td-line);
}

.td-auth__social {
  display: grid;
  gap: 10px;
}

.td-auth__social--2 {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.td-auth__footer-link {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--td-muted);
}

.td-auth__footer-link a {
  color: var(--td-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.td-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 20px;
  font-size: 12px;
  color: var(--td-ink-soft);
  line-height: 1.5;
}

.td-check input {
  margin-top: 2px;
  flex-shrink: 0;
}

.td-check a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.td-pw-layout {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 16px;
  align-items: start;
}

.td-pw-rules {
  margin-top: 28px;
  padding: 12px 0 0;
  font-size: 11px;
  color: var(--td-muted);
}

.td-pw-rules__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--td-ink-soft);
}

.td-pw-rules ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.td-pw-rules li {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  line-height: 1.35;
}

.td-pw-rules li::before {
  content: "○";
  color: var(--td-line-strong);
  flex-shrink: 0;
}

.td-pw-rules li.is-ok {
  color: #2d6e46;
}

.td-pw-rules li.is-ok::before {
  content: "✓";
  color: #2d6e46;
}

@media (max-width: 980px) {
  .td-auth,
  .td-auth--register {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .td-auth__hero {
    min-height: 420px;
    padding: 40px 28px 32px;
  }

  .td-auth__panel {
    padding: 40px 24px 56px;
  }

  .td-pw-layout {
    grid-template-columns: 1fr;
  }

  .td-pw-rules {
    margin-top: 0;
  }

  .td-auth__social--2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .td-field-row {
    grid-template-columns: 1fr;
  }

  .td-auth__benefits--4 {
    grid-template-columns: 1fr;
  }
}
