/* Auth pages — Ethereal Glass + Editorial Split */

:root {
  --auth-bg: #050505;
  --auth-ink: #f4f3ef;
  --auth-muted: rgba(244, 243, 239, 0.58);
  --auth-line: rgba(255, 255, 255, 0.1);
  --auth-shell: rgba(255, 255, 255, 0.04);
  --auth-core: rgba(12, 12, 12, 0.82);
  --auth-accent: #9bb87a;
  --auth-accent-deep: #4a5d3a;
  --auth-warm: #c4a574;
  --auth-danger: #e07a6a;
  --auth-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --auth-radius-outer: 2rem;
  --auth-radius-inner: calc(2rem - 0.4rem);
  --auth-font-display: "Syne", sans-serif;
  --auth-font-body: "Manrope", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.auth-body {
  margin: 0;
  min-height: 100dvh;
  color: var(--auth-ink);
  font-family: var(--auth-font-body);
  font-weight: 400;
  line-height: 1.55;
  background: var(--auth-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.auth-body a {
  color: inherit;
  text-decoration: none;
}

.auth-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 12% 18%, rgba(74, 93, 58, 0.28), transparent 60%),
    radial-gradient(ellipse 45% 40% at 88% 12%, rgba(196, 165, 116, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 50% at 70% 88%, rgba(155, 184, 122, 0.1), transparent 60%),
    var(--auth-bg);
}

.auth-grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-family: var(--auth-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: background-color 0.55s var(--auth-ease), transform 0.55s var(--auth-ease);
}

.auth-brand:hover {
  background: rgba(255, 255, 255, 0.08);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--auth-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    color 0.55s var(--auth-ease),
    background-color 0.55s var(--auth-ease),
    transform 0.55s var(--auth-ease);
}

.auth-back:hover {
  color: var(--auth-ink);
  background: rgba(255, 255, 255, 0.08);
}

.auth-back:active {
  transform: scale(0.98);
}

.auth-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.55s var(--auth-ease);
}

.auth-back:hover .auth-back-icon {
  transform: translateX(-2px);
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2.5rem 1.25rem 3.5rem;
}

.auth-grid {
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.auth-copy {
  display: grid;
  gap: 1.15rem;
  max-width: 32rem;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 184, 122, 0.28);
  background: rgba(155, 184, 122, 0.1);
  color: var(--auth-accent);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-wrap: balance;
}

.auth-title span {
  color: var(--auth-accent);
}

.auth-lead {
  margin: 0;
  max-width: 28rem;
  color: var(--auth-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.auth-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: 0.8rem;
}

.auth-chip::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--auth-accent);
}

/* Double-bezel form */
.auth-bezel {
  padding: 0.4rem;
  border-radius: var(--auth-radius-outer);
  background: var(--auth-shell);
  border: 1px solid var(--auth-line);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.85);
}

.auth-bezel-core {
  border-radius: var(--auth-radius-inner);
  background: var(--auth-core);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  padding: 1.75rem 1.35rem;
}

.auth-form-head {
  margin-bottom: 1.75rem;
}

.auth-form-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--auth-font-display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.auth-form-head p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.92rem;
}

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

.auth-field {
  display: grid;
  gap: 0.45rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.auth-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-muted);
}

.auth-input {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--auth-ink);
  font-family: var(--auth-font-body);
  font-size: 1rem;
  outline: none;
  transition:
    border-color 0.55s var(--auth-ease),
    background-color 0.55s var(--auth-ease),
    box-shadow 0.55s var(--auth-ease),
    transform 0.55s var(--auth-ease);
}

.auth-input::placeholder {
  color: rgba(244, 243, 239, 0.32);
}

.auth-input:hover {
  background: rgba(255, 255, 255, 0.05);
}

.auth-input:focus {
  border-color: rgba(155, 184, 122, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(155, 184, 122, 0.12);
}

.auth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  color: var(--auth-muted);
  font-size: 0.9rem;
  font-weight: 500;
  user-select: none;
}

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

.auth-check-box {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.45s var(--auth-ease), background-color 0.45s var(--auth-ease);
}

.auth-check-box::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--auth-accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.45s var(--auth-ease), transform 0.45s var(--auth-ease);
}

.auth-check input:checked + .auth-check-box {
  border-color: var(--auth-accent);
}

.auth-check input:checked + .auth-check-box::after {
  opacity: 1;
  transform: scale(1);
}

.auth-check input:focus-visible + .auth-check-box {
  box-shadow: 0 0 0 4px rgba(155, 184, 122, 0.16);
}

.auth-link {
  color: var(--auth-ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(244, 243, 239, 0.28);
  transition: text-decoration-color 0.45s var(--auth-ease), color 0.45s var(--auth-ease);
}

.auth-link:hover {
  color: var(--auth-accent);
  text-decoration-color: var(--auth-accent);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.9rem 0.9rem 0.9rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--auth-ink);
  color: #111;
  font-family: var(--auth-font-body);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.55s var(--auth-ease),
    background-color 0.55s var(--auth-ease),
    box-shadow 0.55s var(--auth-ease);
  box-shadow: 0 16px 40px -20px rgba(244, 243, 239, 0.45);
}

.auth-btn:hover {
  background: #fff;
  box-shadow: 0 20px 48px -18px rgba(244, 243, 239, 0.55);
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  transition: transform 0.55s var(--auth-ease);
}

.auth-btn:hover .auth-btn-icon {
  transform: translate(2px, -1px) scale(1.05);
}

.auth-footer-links {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--auth-line);
  text-align: center;
  color: var(--auth-muted);
  font-size: 0.9rem;
}

.auth-footer-links a {
  color: var(--auth-ink);
  font-weight: 600;
  transition: color 0.45s var(--auth-ease);
}

.auth-footer-links a:hover {
  color: var(--auth-accent);
}

.auth-validation {
  margin: 0;
  color: var(--auth-danger);
  font-size: 0.85rem;
}

.auth-validation-summary {
  margin: 0 0 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(224, 122, 106, 0.35);
  background: rgba(224, 122, 106, 0.1);
  color: var(--auth-danger);
  font-size: 0.9rem;
}

.auth-validation-summary:empty,
.auth-validation-summary.validation-summary-valid {
  display: none;
}

.auth-reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.9s var(--auth-ease),
    transform 0.9s var(--auth-ease);
}

.auth-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.auth-reveal-delay {
  transition-delay: 0.12s;
}

@media (min-width: 900px) {
  .auth-top {
    padding: 1.5rem 2rem 0;
  }

  .auth-main {
    padding: 3rem 2rem 4rem;
  }

  .auth-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }

  .auth-bezel-core {
    padding: 2.25rem;
  }
}

@media (max-width: 899px) {
  .auth-main {
    align-items: flex-start;
    padding-top: 2rem;
  }

  .auth-copy {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* RegisterClient — ровные секции формы */
.auth-cascade {
  width: min(100%, 720px);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
}

.auth-cascade-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.5rem;
  max-width: 36rem;
}

.auth-cascade-stack {
  display: grid;
  gap: 1rem;
}

.auth-cascade-card .auth-bezel-core {
  padding: 1.5rem 1.25rem;
}

.auth-cascade-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.auth-cascade-card-title h2 {
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.auth-cascade-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 184, 122, 0.3);
  background: rgba(155, 184, 122, 0.12);
  color: var(--auth-accent);
  font-family: var(--auth-font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-cascade-fields {
  display: grid;
  gap: 1rem;
}

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

.auth-field--full {
  grid-column: 1 / -1;
}

.auth-cascade-actions {
  display: grid;
  gap: 1rem;
  margin-top: 0.25rem;
}

.auth-cascade-foot {
  text-align: center;
  color: var(--auth-muted);
  font-size: 0.92rem;
}

.auth-cascade-foot a {
  color: var(--auth-ink);
  font-weight: 600;
  transition: color 0.45s var(--auth-ease);
}

.auth-cascade-foot a:hover {
  color: var(--auth-accent);
}

@media (min-width: 700px) {
  .auth-cascade-fields--2 {
    grid-template-columns: 1fr 1fr;
  }

  .auth-cascade-card .auth-bezel-core {
    padding: 1.75rem 1.6rem;
  }

  .auth-cascade-stack {
    gap: 1.15rem;
  }
}

/* Выбор кабинета при нескольких ролях */
.auth-choice-stack {
  display: grid;
  gap: 0.85rem;
}

.auth-choice-card {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 2.75rem 1.1rem 1.15rem;
  border: 1px solid var(--auth-line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.35s var(--auth-ease), background 0.35s var(--auth-ease), transform 0.35s var(--auth-ease);
}

.auth-choice-card:hover {
  border-color: rgba(155, 184, 122, 0.45);
  background: rgba(155, 184, 122, 0.08);
  transform: translateY(-1px);
}

.auth-choice-card-title {
  font-family: var(--auth-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-choice-card-desc {
  color: var(--auth-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-choice-card-go {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 184, 122, 0.35);
  color: var(--auth-accent);
  transform: translateY(-50%);
}


