/* Professional auth shells — Trinix brand #003e89 */
:root {
  --auth-ink: var(--tx-text, #0c1222);
  --auth-muted: var(--tx-muted, #334155);
  --auth-line: var(--tx-border-form, rgba(12, 18, 34, 0.12));
  --auth-brand: var(--tx-brand, #003e89);
  --auth-brand-deep: #002a5c;
  --auth-paper: var(--tx-page, #eef2f7);
  --auth-panel: var(--tx-surface-card, #ffffff);
  --auth-form: var(--tx-surface-form, #f3f7fc);
  --auth-inset: var(--tx-surface-inset, #e9eef5);
}

.tx-auth {
  min-height: 100vh;
  margin: 0;
  font-family: Epilogue, Outfit, system-ui, sans-serif;
  color: var(--auth-ink);
  background: var(--auth-paper);
}

.tx-auth *,
.tx-auth *::before,
.tx-auth *::after {
  box-sizing: border-box;
}

.tx-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.tx-auth-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: #fff;
  background:
    linear-gradient(160deg, rgba(0, 20, 50, 0.55), rgba(0, 42, 92, 0.88)),
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(145deg, #003e89, #001a3d);
  overflow: hidden;
}

.tx-auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(
      -28deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.035) 18px,
      rgba(255, 255, 255, 0.035) 19px
    );
  pointer-events: none;
}

.tx-auth-brand a {
  color: #fff;
  text-decoration: none;
}

.tx-auth-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tx-auth-brand-mark img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.tx-auth-brand-copy {
  max-width: 28rem;
  margin: 3rem 0;
}

.tx-auth-brand-copy h1 {
  margin: 0 0 0.85rem;
  font-family: Outfit, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}

.tx-auth-brand-copy p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #e2e8f0;
}

.tx-auth-brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tx-auth-brand-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 650;
  color: #fff;
}

.tx-auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, var(--tx-glow-brand, rgba(0, 62, 137, 0.06)), transparent 55%),
    var(--auth-form);
}

.tx-auth-card {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 1.25rem;
  border-radius: 18px;
  background: var(--auth-panel);
  border: 1px solid var(--tx-border-card, var(--auth-line));
  box-shadow: 0 12px 40px rgba(12, 18, 34, 0.06);
}

.tx-auth-card-head {
  margin-bottom: 1.5rem;
}

.tx-auth-card-head h2 {
  margin: 0 0 0.4rem;
  font-family: Outfit, sans-serif;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--auth-ink);
}

.tx-auth-card-head p {
  margin: 0;
  color: var(--auth-muted);
  line-height: 1.55;
}

.tx-auth-tools {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: flex;
  gap: 0.5rem;
}

.tx-auth-panel {
  position: relative;
}

.tx-auth-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tx-auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink) !important;
  font: inherit;
  font-weight: 650;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tx-auth-google:hover {
  background: #f8fafc;
  border-color: rgba(12, 18, 34, 0.22);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.tx-auth-google svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tx-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--auth-muted);
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.tx-auth-form {
  display: grid;
  gap: 0.95rem;
}

.tx-auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--auth-ink);
}

.tx-auth-field input,
.tx-auth-field select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--tx-border-form, #cbd5e1);
  background: var(--auth-inset);
  color: var(--auth-ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tx-auth-field input:focus,
.tx-auth-field select:focus {
  outline: none;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(0, 62, 137, 0.15);
}

.tx-auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tx-auth-pass {
  position: relative;
}

.tx-auth-pass input {
  padding-right: 3rem;
}

.tx-auth-pass button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.tx-auth-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.tx-auth-inline label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--auth-muted);
  cursor: pointer;
}

.tx-auth-inline a,
.tx-auth-foot a {
  color: var(--auth-brand);
  font-weight: 650;
  text-decoration: none;
}

.tx-auth-inline a:hover,
.tx-auth-foot a:hover {
  text-decoration: underline;
}

.tx-auth-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--auth-ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.tx-auth-submit:hover {
  background: var(--auth-brand);
}

.tx-auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tx-auth-submit-secondary {
  background: #fff;
  color: var(--auth-ink);
  border: 1px solid var(--auth-line);
}

.tx-auth-submit-secondary:hover {
  background: #f8fafc;
  color: var(--auth-ink);
}

.tx-auth-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
}

.tx-auth-foot {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--auth-muted);
  font-size: 0.925rem;
}

.tx-auth-msg {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.tx-auth-msg.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.tx-auth-msg.is-ok {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #a7f3d0;
}

.tx-auth-msg[hidden],
.tx-auth-inline[hidden],
.tx-auth-hidden,
[hidden] {
  display: none !important;
}

.tx-auth-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tx-auth-step {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tx-auth-step span {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: var(--auth-muted);
  font-size: 0.85rem;
}

.tx-auth-step.is-active span {
  background: var(--auth-ink);
  border-color: var(--auth-ink);
  color: #fff;
}

.tx-auth-step.is-done span {
  background: #e8f0fa;
  border-color: var(--auth-brand);
  color: var(--auth-brand);
}

.tx-auth-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--auth-muted);
}

.tx-auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.875rem;
  color: var(--auth-muted);
  line-height: 1.5;
}

.tx-auth-check input {
  margin-top: 0.2rem;
}

@media (max-width: 960px) {
  .tx-auth-shell {
    grid-template-columns: 1fr;
  }

  .tx-auth-brand {
    min-height: auto;
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .tx-auth-brand-copy {
    margin: 1.25rem 0 0.75rem;
  }

  .tx-auth-brand-copy h1 {
    font-size: clamp(1.55rem, 6vw, 2rem);
  }

  .tx-auth-brand-copy p {
    font-size: 0.95rem;
  }

  .tx-auth-brand-meta {
    display: none;
  }

  .tx-auth-panel {
    padding: 1.5rem 1.15rem 2.5rem;
  }

  .tx-auth-field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tx-auth-google,
  .tx-auth-submit,
  .tx-auth-field input {
    transition: none !important;
  }
}
