/* DP Connect — стили: тёмная тема + glassmorphism + OTP + сила пароля + тосты */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0f172a;
  --bg-accent: #1e293b;
  --card: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6c7bff;
  --accent-hover: #5a6ae6;
  --accent-glow: rgba(108, 123, 255, 0.25);
  --ok: #4ade80;
  --warn: #f59e0b;
  --err: #f87171;
  --error: #f87171;
  --error-glow: rgba(248, 113, 113, 0.22);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  /* переменные OTP-карточки */
  --bg-color: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.72);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --shadow-card: 0 20px 40px -15px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05) inset;
  --shadow-input: 0 4px 12px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.1);
  --shadow-focus: 0 0 0 3px var(--accent-glow), 0 4px 12px rgba(0,0,0,.2);
  --radius-input: 14px;
  --radius-pill: 999px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(108,123,255,.12), transparent),
              radial-gradient(900px 500px at 10% 110%, rgba(108,123,255,.08), transparent),
              var(--bg);
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px; position: relative;
}

.hidden { display: none !important; }

/* ============================================================
   Тосты (всплывающие сообщения)
   ============================================================ */
.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px;
  width: min(92vw, 380px);
}

.toast {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border-radius: 12px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.5);
  font-size: 13px; color: var(--text);
  animation: toastIn .35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast.out { animation: toastOut .3s ease forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px) scale(.97); } }

.toast-icon {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.toast.success .toast-icon { background: rgba(74, 222, 128, .14); color: var(--ok); }
.toast.error   .toast-icon { background: rgba(248, 113, 113, .14); color: var(--err); }
.toast.info    .toast-icon { background: rgba(108, 123, 255, .14); color: var(--accent); }

/* ============================================================
   Карточка / обёртка
   ============================================================ */
.auth-wrapper { position: relative; z-index: 2; width: 100%; max-width: 460px; }

.auth-card {
  position: relative; border-radius: 18px; padding: 34px 30px;
  width: 100%; overflow: hidden;
  background: var(--card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.5);
  transition: box-shadow var(--transition-smooth);
}

.auth-header { text-align: center; margin-bottom: 22px; }
.auth-header h1 { font-size: 24px; }
.auth-header p { color: var(--muted); font-size: 14px; margin-top: 5px; }

.auth-footer { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }

.auth-decoration { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.deco-circle { position: absolute; border-radius: 50%; background: rgba(108,123,255,.06); }
.deco-circle:nth-child(1) { width: 200px; height: 200px; top: -60px; right: -60px; }
.deco-circle:nth-child(2) { width: 140px; height: 140px; bottom: -40px; left: -40px; }
.deco-circle:nth-child(3) { width: 60px; height: 60px; bottom: 30px; right: 20px; opacity: .5; }

/* ---------- Табы вход/регистрация ---------- */
.auth-tabs { display: flex; gap: 6px; background: rgba(15,23,42,.6); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; transition: all .2s; }
.auth-tab.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ---------- Поля (floating labels) ---------- */
.form-group-floating { position: relative; margin-bottom: 18px; }

.form-group-floating input {
  width: 100%; padding: 14px 14px 14px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(15,23,42,.55);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-group-floating.has-eye input { padding-right: 52px; }

.form-group-floating input:focus { border-color: var(--accent); }
.form-group-floating input:disabled { opacity: .55; }

.form-group-floating label {
  position: absolute; left: 16px; top: 14px; color: var(--muted); font-size: 14px;
  pointer-events: none; transition: all .18s ease;
}

.form-group-floating input:focus + label,
.form-group-floating input:not(:placeholder-shown) + label {
  top: -8px; left: 12px; font-size: 11px; padding: 0 6px;
  background: var(--bg-accent); border-radius: 4px; color: var(--accent);
}

/* ---------- Ошибки полей ---------- */
.form-group-floating.invalid input { border-color: var(--err); box-shadow: 0 0 0 3px var(--error-glow); }
.form-group-floating.invalid input:focus + label,
.form-group-floating.invalid input:not(:placeholder-shown) + label { color: var(--err); }
.form-group-floating.invalid { animation: shakeX .4s ease; }
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.field-error { display: none; font-size: 12px; color: var(--err); margin: -12px 2px 14px; }

/* ---------- Кнопка «глаз» ---------- */
.eye-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  cursor: pointer; transition: .2s;
}
.eye-btn:hover { background: rgba(15,23,42,.8); color: var(--text); }
.eye-btn svg { width: 19px; height: 19px; }

/* ============================================================
   Сила пароля (регистрация)
   ============================================================ */
.pw-strength { margin: -8px 2px 14px; }

.pw-status-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pw-status-left { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
#pwStatus { font-size: 12px; font-weight: 700; color: var(--err); transition: color .3s; }

.pw-status-icon {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(248,113,113,.1); color: var(--err);
  transition: .3s; font-size: 13px;
}
.pw-status-icon svg { width: 14px; height: 14px; }

.pw-range { width: 100%; height: 6px; border-radius: 20px; background: #252a38; overflow: hidden; }
.pw-range-status { width: 15%; height: 100%; border-radius: 20px; background: var(--err); transition: width .4s ease, background .3s ease; }

/* ---------- Требования ---------- */
.pw-requirements { margin: 12px 2px 16px; }
.pw-req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.pw-req {
  display: flex; align-items: center; gap: 7px; padding: 7px 9px; min-height: 36px;
  border: 1px solid var(--border); border-radius: 9px; background: rgba(15,23,42,.45);
  color: var(--muted); font-size: 11.5px; transition: .3s;
}
.pw-req:last-child { grid-column: span 2; }

.pw-req .check {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  background: #1d2230; color: #596174;
  display: flex; align-items: center; justify-content: center; transition: .3s;
}
.pw-req .check svg { width: 11px; height: 11px; }

.pw-req.valid { border-color: rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .06); color: var(--text); }
.pw-req.valid .check { background: var(--ok); color: #fff; transform: scale(1.05); }
.pw-req.valid .check svg { stroke-dashoffset: 0; transition: stroke-dashoffset .4s ease; }
.pw-req .check svg { transition: stroke-dashoffset .4s ease; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn-primary {
  position: relative; width: 100%; margin-top: 4px; padding: 13px; border: 0;
  border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .15s, filter .2s, opacity .2s;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.btn-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }

.form-msg { font-size: 13px; margin-top: 10px; min-height: 16px; }
.form-msg.err { color: var(--err); }
.form-msg.ok  { color: var(--ok); }

/* ============================================================
   OTP-карточка
   ============================================================ */
.otp-card {
  position: relative; z-index: 2; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: cardEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cardEnter { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.auth-card.shake { animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes shake {
  10%,90% { transform: translate3d(-2px,0,0); }
  20%,80% { transform: translate3d(4px,0,0); }
  30%,50%,70% { transform: translate3d(-6px,0,0); }
  40%,60% { transform: translate3d(6px,0,0); }
}

#otp-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; position: relative; z-index: 3; transition: opacity var(--transition-smooth); }
#otp-subtitle { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 24px; position: relative; z-index: 3; transition: opacity var(--transition-smooth); max-width: 320px; }
#otp-subtitle b { color: var(--text); }

.stage { position: relative; width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

.input-stage { display: flex; gap: 10px; justify-content: center; position: relative; z-index: 3; transition: opacity .25s ease; }
.input-stage.hidden { opacity: 0; pointer-events: none; }

.input-pill {
  width: 48px; height: 64px; border-radius: var(--radius-input);
  background: rgba(15, 23, 42, 0.55); border: 1px solid var(--border);
  box-shadow: var(--shadow-input);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 600; color: var(--text-main); text-align: center;
  outline: none; caret-color: var(--accent);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition-smooth);
}
.input-pill:focus { border-color: var(--accent); box-shadow: var(--shadow-focus); }
.input-pill.filled { border-color: var(--accent); background: var(--card-bg); }
.input-pill.error { border-color: var(--error); box-shadow: 0 0 0 3px var(--error-glow); }

.orbit-layer { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; z-index: 4; }
.orbit-layer.active { display: flex; }
.orbit-ring { position: relative; width: 64px; height: 64px; }
.orbit-ring.spin { animation: ringSpin 1.6s cubic-bezier(0.6, 0, 0.4, 1) forwards; }
@keyframes ringSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.orbit-node {
  position: absolute; top: 50%; left: 50%; width: 48px; height: 64px; margin: -32px 0 0 -24px;
  border-radius: var(--radius-input); background: #1e293b; border: 1.5px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 600; color: var(--text-main);
  will-change: transform, opacity; transform-origin: 24px 32px;
}
.orbit-node.node-fly { animation: nodeFly 1.6s cubic-bezier(0.34, 1.4, 0.64, 1) forwards; }
@keyframes nodeFly {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  25% { transform: translate(var(--dx), var(--dy)) scale(1.05); opacity: 1; }
  75% { transform: translate(var(--dx), var(--dy)) scale(.95); opacity: 1; }
  100% { transform: translate(0,0) scale(.3); opacity: 0; }
}

.loading-wrap { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 5; }
.loading-wrap.active { display: flex; }
.loading-core { position: relative; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; animation: morphIn .5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes morphIn { from { transform: scale(.4) rotate(-45deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.loading-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, var(--accent) 70%, transparent 100%);
  mask: radial-gradient(circle, transparent 60%, black 62%);
  -webkit-mask: radial-gradient(circle, transparent 60%, black 62%);
  animation: spin 1.1s linear infinite;
}
.loading-inner {
  width: 44px; height: 44px; border-radius: 50%; background: #0f172a;
  border: 1.5px solid rgba(108,123,255,.25); box-shadow: inset 0 0 12px rgba(108,123,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--accent);
}
.loading-pulse { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; animation: pulseRing 1.6s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(.85); opacity: .55; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Сцена успеха --- */
.success-wrap { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 6; pointer-events: none; }
.success-wrap.active { display: flex; }

.bubble { position: absolute; top: 50%; left: 50%; width: 110px; height: 110px; border-radius: 50%; border: 2px solid var(--success); transform: translate(-50%,-50%) scale(0); opacity: 0; will-change: transform, opacity; }
.success-wrap.active .bubble { animation: bubbleGrow 1.4s cubic-bezier(0.16,1,0.3,1) forwards; }
.success-wrap.active .bubble:nth-child(2) { animation-delay: .12s; }
.success-wrap.active .bubble:nth-child(3) { animation-delay: .24s; }
.success-wrap.active .bubble:nth-child(4) { animation-delay: .36s; }
@keyframes bubbleGrow { 0% { transform: translate(-50%,-50%) scale(.2); opacity: 1; } 70% { opacity: .5; } 100% { transform: translate(-50%,-50%) scale(3.6); opacity: 0; } }

.success-flash {
  position: absolute; top: 50%; left: 50%; width: 240px; height: 240px; margin: -120px 0 0 -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.55) 0%, rgba(16,185,129,.15) 40%, transparent 70%);
  opacity: 0; transform: scale(.4);
}
.success-wrap.active .success-flash { animation: flashPop .9s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes flashPop { 0% { transform: scale(.4); opacity: 0; } 35% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

.confetti { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-radius: 50%; opacity: 0; transform: translate(-50%,-50%) scale(.4); will-change: transform, opacity; }
.success-wrap.active .confetti { animation: confettiFly 1.3s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes confettiFly {
  0% { transform: translate(-50%,-50%) scale(.4); opacity: 1; }
  20% { transform: translate(calc(-50% + var(--cx) * .3), calc(-50% + var(--cy) * .3)) scale(1.2); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--cx)), calc(-50% + var(--cy))) scale(.6); opacity: 0; }
}

.success-vault {
  position: relative; width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, #34d399 0%, var(--success) 55%, #059669 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(16,185,129,.18), 0 0 50px var(--success-glow), 0 14px 30px -10px rgba(16,185,129,.7);
  animation: popIn .7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; z-index: 3;
}
@keyframes popIn {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  55% { transform: scale(1.25) rotate(12deg); opacity: 1; }
  75% { transform: scale(.95) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.checkmark {
  width: 32px; height: 32px; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  fill: none; stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: drawCheck .55s .3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.success-badge {
  position: absolute; top: calc(50% + 56px); left: 50%;
  transform: translateX(-50%) translateY(8px) scale(.8);
  background: var(--success); color: #fff; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 6px 14px;
  border-radius: var(--radius-pill); box-shadow: 0 8px 20px -6px var(--success-glow);
  opacity: 0; white-space: nowrap;
}
.success-wrap.active .success-badge { animation: badgePop .55s .65s cubic-bezier(0.34,1.56,0.64,1) forwards; }
@keyframes badgePop { 0% { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.8); } 100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }

.auth-card.success-tint {
  box-shadow: 0 24px 60px rgba(2,6,23,.5), 0 0 0 2px rgba(16,185,129,.3), 0 0 80px rgba(16,185,129,.22);
}

/* --- Сцена фейла --- */
.fail-wrap { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 6; pointer-events: none; }
.fail-wrap.active { display: flex; }

.fail-flash {
  position: absolute; top: 50%; left: 50%; width: 240px; height: 240px; margin: -120px 0 0 -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248,113,113,.5) 0%, rgba(248,113,113,.12) 40%, transparent 70%);
  opacity: 0; transform: scale(.4);
}
.fail-wrap.active .fail-flash { animation: flashPop .9s cubic-bezier(0.16,1,0.3,1) forwards; }

.fail-bubble { position: absolute; top: 50%; left: 50%; width: 110px; height: 110px; border-radius: 50%; border: 2px solid var(--error); transform: translate(-50%,-50%) scale(0); opacity: 0; }
.fail-wrap.active .fail-bubble { animation: bubbleGrow 1.2s cubic-bezier(0.16,1,0.3,1) forwards; }

.fail-vault {
  position: relative; width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, #fb7185 0%, #ef4444 55%, #b91c1c 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(248,113,113,.16), 0 0 50px rgba(248,113,113,.3), 0 14px 30px -10px rgba(239,68,68,.6);
  animation: popIn .7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; z-index: 3;
}
.x-mark {
  width: 30px; height: 30px; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  fill: none; stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: drawX .45s .25s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
@keyframes drawX { to { stroke-dashoffset: 0; } }

.fail-badge {
  position: absolute; top: calc(50% + 56px); left: 50%;
  transform: translateX(-50%) translateY(8px) scale(.8);
  background: var(--error); color: #fff; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 6px 14px;
  border-radius: var(--radius-pill); box-shadow: 0 8px 20px -6px rgba(248,113,113,.4);
  opacity: 0; white-space: nowrap;
}
.fail-wrap.active .fail-badge { animation: badgePop .55s .5s cubic-bezier(0.34,1.56,0.64,1) forwards; }

.auth-card.fail-tint {
  box-shadow: 0 24px 60px rgba(2,6,23,.5), 0 0 0 2px rgba(248,113,113,.3), 0 0 80px rgba(248,113,113,.18);
}

/* ---------- Сообщения / кнопки внизу OTP ---------- */
.error-msg {
  color: var(--error); font-size: .75rem; font-weight: 500; opacity: 0; transform: translateY(-6px);
  transition: all var(--transition-smooth); height: 0; margin-bottom: 0; position: relative; z-index: 3;
}
.error-msg.show { opacity: 1; transform: translateY(0); height: 18px; margin-bottom: 12px; }

.resend-btn {
  background: none; border: none; font-family: var(--font); font-size: .813rem;
  color: var(--text-muted); cursor: pointer; padding: 8px 16px;
  border-radius: var(--radius-pill); transition: all var(--transition-smooth);
  margin-top: 4px; position: relative; z-index: 10;
}
.resend-btn span { color: var(--accent); font-weight: 600; margin-left: 4px; }
.resend-btn span.timer { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.resend-btn:hover:not(:disabled) { background: rgba(108,123,255,.05); color: var(--text-main); }
.resend-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.resend-btn:disabled { opacity: .5; cursor: not-allowed; }

.back-btn {
  display: block; margin: 2px auto 0; padding: 8px 18px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--muted); font-family: var(--font); font-size: .813rem; cursor: pointer;
  transition: all .2s;
}
.back-btn:hover { color: var(--text); border-color: var(--muted); }

/* ---------- Кабинет (без изменений) ---------- */
.account-header { display: flex; align-items: center; gap: 16px; }
.avatar-block { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); background: rgba(15, 23, 42, 0.55); visibility: hidden;
}
.avatar-upload {
  position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 2px solid var(--bg-accent); transition: filter .2s;
}
.avatar-upload:hover { filter: brightness(1.15); }
.account-title { flex: 1; min-width: 0; }
.account-title h1 { font-size: 20px; overflow-wrap: break-word; }
.acc-username { color: var(--muted); font-size: 14px; margin-top: 2px; }
.badge {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 10px;
  background: rgba(74, 222, 128, 0.14); color: var(--ok); margin-top: 7px;
}
.badge.no { background: rgba(248, 113, 113, 0.14); color: var(--err); }
.account-divider { height: 1px; background: var(--border); margin: 20px 0; }
.account-actions { display: flex; flex-direction: column; }
.account-meta { margin-top: 20px; font-size: 13px; color: var(--muted); }
.account-meta p { margin-top: 4px; }
.account-meta b { color: var(--text); }
.muted { opacity: .75; }
.btn-icon {
  border: 1px solid var(--border); border-radius: 10px; background: transparent;
  color: var(--muted); width: 38px; height: 38px; font-size: 16px; cursor: pointer;
}
.btn-icon:hover { color: var(--err); border-color: var(--err); }
.btn-ghost {
  width: 100%; margin-top: 10px; padding: 11px; border: 1px solid var(--border);
  border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* ---------- SSO-карточка (без изменений) ---------- */
.sso-card {
  max-width: 380px; text-align: center; min-height: 260px;
  display: flex; flex-direction: column; justify-content: center;
}
#sso-status p { color: var(--muted); margin-top: 14px; font-size: 14px; }
.sso-spinner { margin-top: 8px; }
.sso-spinner .spinner { width: 26px; height: 26px; border-color: rgba(108,123,255,.25); border-top-color: var(--accent); }
.sso-done-icon, .sso-error-icon {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 14px;
}
.sso-done-icon  { background: rgba(74, 222, 128, 0.15); color: var(--ok); }
.sso-error-icon { background: rgba(248, 113, 113, 0.15); color: var(--err); }
#sso-done p, #sso-error p { color: var(--muted); font-size: 14px; margin-top: 8px; }
#sso-done p b, #sso-error p b { color: var(--text); }
.sso-register-hint { color: var(--muted); font-size: 13px; margin-top: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Адаптив / доступность ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .orbit-node.node-fly, .confetti, .bubble, .fail-bubble { display: none; }
}

@media (max-width: 400px) {
  .input-pill, .orbit-node { width: 40px; height: 56px; font-size: 1.25rem; }
  .orbit-node { margin: -28px 0 0 -20px; transform-origin: 20px 28px; }
  .input-stage { gap: 6px; }
  .stage { height: 180px; }
  .pw-req-grid { grid-template-columns: 1fr; }
  .pw-req:last-child { grid-column: span 1; }
}