/* ===== AUTH PAGE (премиальный фон, карточки, формы) ===== */

:root{
  --bg:#0a0e13;
  --panel:#0f141a;
  --stroke:#2a2f36;
  --text:#e6edf7;
  --muted:#97a6bd;

  /* золото/медь палитра */
  --gold-1:#ffb84d;
  --gold-2:#ff9a3c;
  --gold-3:#ffcc73;
  --amber:#ff7a1a;

  --accent: var(--gold-2);
  --radius: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body.auth-page{
  margin:0; color:var(--text); background: var(--bg);
  font: 500 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Manrope", Arial, sans-serif;
}

/* ========== FX BACKGROUND ========== */
.fx-bg{
  position:fixed; inset:0; overflow:hidden; z-index:-1;
  background:
    radial-gradient(1200px 800px at 10% -20%, rgba(255,186,100,.12), transparent 60%),
    radial-gradient(1000px 600px at 110% 0%, rgba(255,139,51,.10), transparent 55%),
    linear-gradient(180deg, #0c1016 0%, #0a0e13 60%, #080b10 100%);
}

.fx-noise{
  position:absolute; inset:-10%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/feGaussianBlur%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity:.18; mix-blend-mode: soft-light; pointer-events:none;
}

/* «световые пятна» */
.fx-orb{position:absolute; width:60vmax; height:60vmax; border-radius:50%;
  filter: blur(40px); opacity:.18; will-change: transform; animation: float 18s ease-in-out infinite alternate;
}
.fx-orb-a{ left:-15vmax; top:-12vmax; background: radial-gradient(circle at 30% 30%, var(--gold-3), transparent 60%); }
.fx-orb-b{ right:-20vmax; top:-10vmax; animation-duration: 22s; background: radial-gradient(circle at 60% 40%, var(--gold-2), transparent 65%); }
.fx-orb-c{ left:10vmax; bottom:-25vmax; animation-duration: 26s; background: radial-gradient(circle at 50% 50%, #ffd8a8, transparent 60%); }

@keyframes float{
  from{ transform: translate3d(0,0,0) scale(1); }
  to  { transform: translate3d(0,-18px,0) scale(1.05); }
}

/* ========== SHELL ========== */
.auth-shell{
  min-height: 100svh;
  display:grid; place-items:center;
  padding: 32px 16px;
}

.auth-card{
  width:min(840px, 92vw);
  background: linear-gradient(180deg, rgba(18,23,30,.9), rgba(15,20,26,.86));
  border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  padding: clamp(18px, 3.4vw, 28px);
  backdrop-filter: blur(8px);
}

.auth-head{ margin-bottom: 12px; }
.auth-head .muted{ color: var(--muted); }

.fx-title{
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, "Manrope", Arial, sans-serif;
  font-weight: 900; letter-spacing: .3px; line-height: 1.05;
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 40px);
  /* Премиальный перелив (оранж-золото) */
  --c1:#ffead1; --c2:#ffc06b; --c3:#ff9a3c; --c4:#ffd27f;
  background: conic-gradient(from 160deg at 50% 50%, var(--c1), var(--c2), var(--c3), var(--c4), var(--c2));
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,.06), 0 12px 28px rgba(255,180,80,.16);
  animation: fxShift 10s linear infinite, fxGlow 4s ease-in-out infinite alternate;
}
@keyframes fxShift{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 200% 50%; }
}
@keyframes fxGlow{
  from{ text-shadow: 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(255,180,80,.12); }
  to  { text-shadow: 0 1px 0 rgba(255,255,255,.06), 0 18px 40px rgba(255,180,80,.22); }
}

/* ========== FORM ========== */
.form{ display:grid; gap:12px; margin-top: 8px; }
.form-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.form-row.alt{ justify-content: space-between; }

.f-label{ display:grid; gap:6px; }
.f-caption{ font-size:.92rem; color:var(--muted); }
.input{
  width:100%; padding:12px 14px; border-radius:12px;
  border:1px solid var(--stroke); background:#0f141a; color:var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.input:focus{ outline:none; border-color:#3a4048; box-shadow: 0 0 0 3px rgba(255,170,90,.15); }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 16px; border-radius:12px; text-decoration:none; cursor:pointer;
  border:1px solid var(--stroke); color:var(--text); background:#0f141a;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  position:relative; overflow:hidden;
}
.btn:hover{ transform: translateY(-1px); border-color:#3a4048; }
.btn.primary{
  background: linear-gradient(180deg, #ffae43, #d97616);
  border-color: rgba(255,174,67,.6);
  color:#0b0f14; font-weight: 800;
  box-shadow: 0 12px 28px rgba(255,174,67,.25);
}
.btn.primary:hover{ filter:brightness(1.04); }
.btn.ghost{ background: transparent; }

.link{ color: var(--gold-2); text-decoration:none; }
.link:hover{ text-decoration:underline; }

.spacer{ flex:1 1 auto; }

/* Ripple эффект */
.ripple::after{
  content:""; position:absolute; inset:0; border-radius:inherit; opacity:0; transform:scale(.8);
  background: radial-gradient(120px 120px at var(--x,50%) var(--y,50%), rgba(255,200,120,.35), transparent 70%);
  transition: opacity .25s ease, transform .25s ease;
}
.ripple:active::after{ opacity:1; transform:scale(1); }

/* ========== MODAL ========== */
.modal{
  border:0; padding:0; margin:auto; max-width: 820px; width: calc(100% - 32px);
  background: transparent;
}
.modal[open]::backdrop{ background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.modal-content{
  background: linear-gradient(180deg, rgba(18,23,30,.95), rgba(15,20,26,.92));
  border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); padding: 16px;
}
.modal-title{ margin: 4px 4px 12px; font: 900 24px/1.1 "Unbounded", system-ui; }
.form-grid{
  display:grid; gap:10px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.span-2{ grid-column: span 2; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top: 8px; }

/* ========== TOAST ========== */
.toast{
  position:fixed; left:50%; top:20px; transform:translateX(-50%) translateY(-8px);
  max-width:min(92vw,560px); padding:12px 16px; border-radius:12px;
  background:#1a2028; color:#fff; border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font: 600 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  z-index: 1000; opacity:0; pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); pointer-events:auto; }
.toast.success{ border-color: rgba(46,204,113,.45); background: rgba(46,204,113,.12); }
.toast.error{   border-color: rgba(231,76,60,.5);  background: rgba(231,76,60,.13); }

/* ========== FOOTER ========== */
.site-footer{ margin-top: 24px; border-top:1px solid rgba(255,255,255,.06); }
.footer-inner{
  max-width: 1200px; margin: 0 auto; padding: 14px 16px;
  display:flex; align-items:center; gap:10px; color:var(--muted);
}
.footer-inner .footer-links{ margin-left:auto; }
.footer-inner a{ color:var(--gold-2); text-decoration:none; }
.footer-inner a:hover{ text-decoration:underline; }

/* mobile */
@media (max-width: 700px){
  .form-grid{ grid-template-columns: 1fr; }
  .span-2{ grid-column: auto; }
}
