/* =========================================================
   ONECLI V2.0 — вход, регистрация, восстановление пароля
   ========================================================= */
:root {
  --bg-deep: #050505;
  --gold: #D4AF37;
  --gold-light: #FFD700;
  --gold-pale: #FFF1B8;
  --gold-dark: #8A6A12;
  --text: #E0E0E0;
  --muted: #8F8F8F;
  --line: rgba(212, 175, 55, .22);
  --red: #FF5C6C;
  --gold-grad: linear-gradient(110deg, #8A6A12 0%, #D4AF37 22%, #FFF1B8 42%, #FFD700 55%, #D4AF37 72%, #8A6A12 100%);
  --ff-title: 'Unbounded', 'Arial Black', sans-serif;
  --ff-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.au {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg-deep); color: var(--text);
  font: 400 15px/1.55 var(--ff-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

/* ---------- фон ---------- */
.au-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url("../img/auth_bg.webp") 70% center / cover no-repeat; }
.au-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 78% 50%, rgba(5, 5, 5, .25), transparent 70%),
    linear-gradient(90deg, rgba(5, 5, 5, .93) 0%, rgba(5, 5, 5, .78) 42%, rgba(5, 5, 5, .55) 70%, rgba(5, 5, 5, .8) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, .55) 0%, transparent 25%, transparent 70%, rgba(5, 5, 5, .95) 100%);
}
.au-bg::after {
  content: ""; position: absolute; inset: -50%; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- шапка ---------- */
.au-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(16px, 4vw, 56px);
}
.au-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.au-logo__mark { position: relative; display: block; width: 38px; height: 38px; filter: drop-shadow(0 0 8px rgba(255, 215, 0, .3)); }
.au-logo__mark img { display: block; width: 100%; height: 100%; }
.au-logo__mark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 240, .95) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 160% 0;
  -webkit-mask: url("../img/logo-gold.webp") center / contain no-repeat;
          mask: url("../img/logo-gold.webp") center / contain no-repeat;
  mix-blend-mode: screen; animation: auShine 4.5s ease-in-out infinite;
}
@keyframes auShine { 0%, 55% { background-position: 160% 0; } 85%, 100% { background-position: -60% 0; } }
.au-logo__text {
  font: 800 19px/1 var(--ff-title); letter-spacing: .14em;
  background: var(--gold-grad); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.au-logo__text em { font-style: normal; font-weight: 400; opacity: .75; font-size: .72em; letter-spacing: .1em; }

.au-lang { display: flex; padding: 4px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 10, 10, .6); backdrop-filter: blur(10px); }
.au-lang a { padding: 6px 12px; border-radius: 999px; font: 600 11.5px/1 var(--ff-title); letter-spacing: .08em; color: var(--muted); text-decoration: none; transition: color .2s, background .2s; }
.au-lang a:hover { color: var(--gold-pale); }
.au-lang a.is-active { color: #140f00; background: linear-gradient(135deg, #FFE680, #D4AF37); }

/* ---------- основная зона ---------- */
.au-main {
  position: relative; z-index: 1; flex: 1;
  width: 100%; max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: 24px clamp(16px, 4vw, 56px) 40px;
}

.au-side { max-width: 560px; animation: auIn .9s var(--ease) both; }
.au-eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 600 11.5px/1.3 var(--ff-title); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.au-eyebrow::before { content: ""; width: 38px; height: 1px; background: var(--gold); }
.au-slogan { margin: 0 0 34px; font: 800 clamp(34px, 4.2vw, 58px)/1.04 var(--ff-title); letter-spacing: -.01em; text-transform: uppercase; color: #fff; }
.au-slogan span { background: var(--gold-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: auGold 6s linear infinite; }
@keyframes auGold { to { background-position: -200% 0; } }
.au-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.au-points li { position: relative; padding-left: 30px; color: #bdbdbd; font-size: 14.5px; }
.au-points li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; transform: rotate(45deg); border: 1.5px solid var(--gold); box-shadow: 0 0 10px rgba(255, 215, 0, .35); }
.au-points b { display: block; margin-bottom: 2px; color: var(--gold-pale); font-weight: 600; }

/* ---------- карточка ---------- */
.au-card {
  position: relative; width: 100%;
  padding: clamp(26px, 4vw, 40px);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(26, 24, 18, .82), rgba(10, 10, 10, .9));
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px #000, 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 60px -30px rgba(255, 215, 0, .35);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: auIn .9s .1s var(--ease) both;
}
.au-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent); opacity: .8;
}
@keyframes auIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.au-head { margin-bottom: 26px; }
.au-head h1 { margin: 0 0 8px; font: 700 clamp(22px, 2.4vw, 27px)/1.2 var(--ff-title); color: #fff; letter-spacing: -.005em; }
.au-head p { margin: 0; color: var(--muted); font-size: 14px; }
.au-badge {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 215, 0, .22), rgba(212, 175, 55, .06));
  border: 1px solid rgba(212, 175, 55, .4); box-shadow: 0 0 24px -6px rgba(255, 215, 0, .5);
}
.au-badge svg { width: 24px; height: 24px; fill: none; stroke: var(--gold-light); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- поля ---------- */
.au-form { display: grid; gap: 14px; }
.au-pair { display: grid; gap: 14px; }

.au-field { position: relative; display: block; }
.au-field input {
  width: 100%; height: 58px; padding: 22px 16px 8px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .45); color: #fff;
  font: 500 15px/1 var(--ff-body); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.au-field input:hover { border-color: rgba(212, 175, 55, .35); }
.au-field input:focus { border-color: var(--gold); background: rgba(0, 0, 0, .6); box-shadow: 0 0 0 4px rgba(212, 175, 55, .14); }
.au-field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px #121008 inset; caret-color: #fff; }
.au-field span {
  position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14.5px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 34px);
  transition: top .2s var(--ease), font-size .2s var(--ease), color .2s, letter-spacing .2s;
}
.au-field input:focus + span,
.au-field input:not(:placeholder-shown) + span,
.au-field input:-webkit-autofill + span { top: 17px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

.au-field--pass input { padding-right: 52px; }
.au-field--pass span { max-width: calc(100% - 70px); }
.au-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--muted); transition: color .2s, background .2s;
}
.au-eye:hover { color: var(--gold-pale); background: rgba(255, 255, 255, .05); }
.au-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.au-eye.is-on { color: var(--gold-light); }

.au-field--code input { text-align: center; font: 700 24px/1 var(--ff-title); letter-spacing: .45em; padding: 20px 16px 6px .45em; }
.au-field--code span { left: 50%; transform: translate(-50%, -50%); }
.au-field--code input:focus + span,
.au-field--code input:not(:placeholder-shown) + span { transform: translate(-50%, -50%); }

/* ---------- строки / ссылки ---------- */
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 4px; font-size: 13.5px; }
.au-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: #c4c4c4; user-select: none; }
.au-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.au-check i { width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(212, 175, 55, .5); background: rgba(0, 0, 0, .4); display: grid; place-items: center; transition: background .2s, box-shadow .2s; }
.au-check i::after { content: ""; width: 9px; height: 5px; border: 2px solid #140f00; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.au-check input:checked + i { background: linear-gradient(135deg, #FFE680, #D4AF37); box-shadow: 0 0 12px rgba(255, 215, 0, .45); }
.au-check input:checked + i::after { opacity: 1; }
.au-check input:focus-visible + i { box-shadow: 0 0 0 3px rgba(212, 175, 55, .3); }

.au-link {
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit;
  color: var(--gold-light); text-decoration: none; background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--ease), color .2s;
}
.au-link:hover { color: var(--gold-pale); background-size: 100% 1px; }

.au-alt { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.au-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.au-resend { margin-top: 16px; text-align: center; font-size: 14px; }

/* ---------- кнопка ---------- */
.au-btn {
  position: relative; overflow: hidden;
  width: 100%; height: 56px; margin-top: 6px; border: 0; border-radius: 14px; cursor: pointer;
  font: 700 13px/1 var(--ff-title); letter-spacing: .14em; text-transform: uppercase; color: #140f00;
  background: linear-gradient(135deg, #FFE680 0%, #FFD700 35%, #D4AF37 70%, #B8901F 100%);
  box-shadow: 0 12px 30px -10px rgba(255, 215, 0, .55), 0 0 0 1px rgba(255, 241, 184, .4) inset;
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.au-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
  animation: auBtn 3.6s ease-in-out infinite;
}
@keyframes auBtn { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.au-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(255, 215, 0, .7), 0 0 0 1px rgba(255, 241, 184, .5) inset; }
.au-btn:active { transform: none; }
.au-btn:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 3px; }
.au-btn.is-busy { filter: saturate(.6) brightness(.85); cursor: progress; }

/* ---------- подвал ---------- */
.au-foot { position: relative; z-index: 1; padding: 0 16px 26px; }
.au-info { margin: 0 auto; max-width: 620px; text-align: center; color: #707070; font-size: 12.5px; line-height: 1.7; }
.au-info a { color: #b9a66a; text-decoration: none; }
.au-info a:hover { color: var(--gold-light); }
.au-info span { letter-spacing: .14em; font-size: 10.5px; text-transform: uppercase; color: #555; }

/* ---------- toastr ---------- */
#toast-container > div {
  opacity: 1 !important; border-radius: 14px !important; padding: 15px 18px 15px 52px !important;
  background-color: rgba(16, 16, 16, .96) !important; color: #eee !important;
  border: 1px solid rgba(212, 175, 55, .4) !important;
  box-shadow: 0 20px 40px -12px #000, 0 0 30px -10px rgba(255, 215, 0, .4) !important;
  font-family: var(--ff-body); font-size: 13.5px; width: min(420px, calc(100vw - 32px)) !important;
}
#toast-container > .toast-success { border-color: rgba(61, 220, 151, .5) !important; }
#toast-container > .toast-error { border-color: rgba(255, 92, 108, .55) !important; }
#toast-container.toast-top-center { top: 16px; }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .au-main { grid-template-columns: minmax(0, 1fr); justify-items: center; padding-top: 8px; }
  .au-side { display: none; }
  .au-card { max-width: 480px; }
  .au-bg { background-position: 62% center; }
  .au-bg::before { background: linear-gradient(180deg, rgba(5, 5, 5, .7) 0%, rgba(5, 5, 5, .82) 40%, rgba(5, 5, 5, .95) 100%); }
}
@media (max-width: 520px) {
  .au-top { padding: 16px; }
  .au-logo__text { font-size: 16px; }
  .au-logo__mark { width: 32px; height: 32px; }
  .au-main { padding: 4px 16px 28px; }
  .au-card { padding: 24px 18px; border-radius: 20px; }
  .au-pair { grid-template-columns: 1fr; }
  .au-row { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
