/* ============================================================
   Year Around v2 — premium login experience
   Self-contained: only affects the auth (login) page.
   Animated aurora background · split brand panel · glass card.
   ============================================================ */

.auth-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}

/* ---- Full-bleed animated stage ---- */
.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(1200px 800px at 12% 18%, rgba(30,95,180,.16), transparent 55%),
    radial-gradient(1000px 700px at 88% 82%, rgba(232,84,30,.12), transparent 55%),
    var(--bg);
}

/* Aurora blobs — soft drifting color, GPU-cheap (transform/opacity only) */
.auth-aurora {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.auth-aurora span {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(70px); opacity: .55;
  will-change: transform;
}
.auth-aurora .a1 { width: 460px; height: 460px; top: -120px; inset-inline-start: -100px;
  background: radial-gradient(circle at 30% 30%, #2f7fd6, transparent 70%);
  animation: drift1 18s ease-in-out infinite; }
.auth-aurora .a2 { width: 520px; height: 520px; bottom: -160px; inset-inline-end: -120px;
  background: radial-gradient(circle at 30% 30%, #e8541e, transparent 70%);
  animation: drift2 22s ease-in-out infinite; }
.auth-aurora .a3 { width: 360px; height: 360px; top: 40%; inset-inline-start: 45%;
  background: radial-gradient(circle at 30% 30%, #16386b, transparent 70%);
  animation: drift3 26s ease-in-out infinite; opacity: .4; }

@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(60px,40px) scale(1.12)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-50px,-30px) scale(1.08)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-40px,30px) scale(1.15)} }

/* faint moving grid overlay for depth */
.auth-wrap::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(30,95,180,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,95,180,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 75%);
}

/* ---- Split shell ---- */
.auth-shell {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  width: 100%;
  max-width: 1180px;
  margin: auto;
  min-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(15,23,42,.28);
  animation: shellIn .8s cubic-bezier(.16,1,.3,1) both;
}
@keyframes shellIn { from{opacity:0; transform:translateY(22px) scale(.985)} to{opacity:1; transform:none} }

/* ===== LEFT: brand panel ===== */
.auth-brand {
  position: relative; overflow: hidden;
  padding: 54px 50px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
  color: #fff;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.16), transparent 50%),
    radial-gradient(90% 70% at 100% 100%, rgba(232,84,30,.35), transparent 55%),
    linear-gradient(150deg, #16386b 0%, #1e5fb4 55%, #2f7fd6 100%);
}
/* soft inner top-edge highlight for glass depth */
.auth-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
/* shimmering sheen sweep */
.auth-brand::after {
  content: ""; position: absolute; top: -60%; inset-inline-start: -30%;
  width: 60%; height: 220%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.18), transparent);
  transform: rotate(8deg);
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen { 0%,60%,100%{transform:translateX(-40%) rotate(8deg); opacity:0} 75%{opacity:1} 90%{transform:translateX(380%) rotate(8deg); opacity:0} }

.auth-brand-orbs span { position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand-orbs .o1 { width: 220px; height: 220px; top: -70px; inset-inline-end: -50px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.30), transparent 70%); animation: floaty 9s ease-in-out infinite; }
.auth-brand-orbs .o2 { width: 150px; height: 150px; bottom: 60px; inset-inline-start: -40px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 70%); animation: floaty 11s ease-in-out infinite reverse; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-18px)} }

.auth-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.auth-brand-logo {
  width: 88px; height: 88px; flex: none;
  display: grid; place-items: center;
  background: #fff;                       /* white tile so the dark logo reads crisply */
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.4);
  animation: logoPop .9s .15s cubic-bezier(.16,1,.3,1) both;
}
.auth-brand-logo img { width: 66px; height: 66px; object-fit: contain; display: block; }
@keyframes logoPop { from{opacity:0; transform:scale(.55) rotate(-14deg)} to{opacity:1; transform:none} }
.auth-brand-co { font-size: 22px; font-weight: 800; letter-spacing: .6px; line-height: 1.1; }
.auth-brand-co small { display: block; font-size: 12px; font-weight: 600; opacity: .82; letter-spacing: 2px; margin-top: 2px; }

.auth-brand-mid { position: relative; z-index: 1; }
.auth-brand-head {
  font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em;
  margin: 0 0 14px;
  animation: rise .7s .25s cubic-bezier(.16,1,.3,1) both;
}
.auth-brand-sub {
  font-size: 15.5px; line-height: 1.7; opacity: .9; max-width: 40ch;
  animation: rise .7s .38s cubic-bezier(.16,1,.3,1) both;
}
@keyframes rise { from{opacity:0; transform:translateY(16px)} to{opacity:1; transform:none} }

.auth-brand-points { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 11px; }
.auth-brand-point {
  display: flex; align-items: center; gap: 13px; font-size: 14.5px; font-weight: 600;
  padding: 11px 14px; border-radius: 14px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  transition: background .2s ease, transform .2s ease;
  animation: rise .6s cubic-bezier(.16,1,.3,1) both;
}
.auth-brand-point:hover { background: rgba(255,255,255,.18); transform: translateX(4px); }
html[dir="rtl"] .auth-brand-point:hover { transform: translateX(-4px); }
.auth-brand-point:nth-child(1){ animation-delay:.5s }
.auth-brand-point:nth-child(2){ animation-delay:.6s }
.auth-brand-point:nth-child(3){ animation-delay:.7s }
.auth-brand-point > i {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 12px; font-size: 15px;
  background: rgba(255,255,255,.20); border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

/* ===== RIGHT: form panel ===== */
.auth-form-panel {
  position: relative;
  padding: 56px 56px 48px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--surface);
}
.auth-form-head { margin-bottom: 28px; animation: rise .7s .3s cubic-bezier(.16,1,.3,1) both; }
.auth-form-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; color: var(--text); }
.auth-form-head p { margin: 0; color: var(--text-muted); font-size: 14px; }

/* staggered field entrance */
.auth-form .field { animation: rise .6s cubic-bezier(.16,1,.3,1) both; margin-bottom: 18px; }
.auth-form .field:nth-of-type(1){ animation-delay:.42s }
.auth-form .field:nth-of-type(2){ animation-delay:.52s }
.auth-actions { animation: rise .6s .62s cubic-bezier(.16,1,.3,1) both; }

/* floating-icon input group */
.auth-input {
  position: relative;
}
.auth-input > input {
  height: 52px;
  padding-inline-start: 46px;
  padding-inline-end: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-input > input:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.auth-input > .auth-ico {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 14px;
  display: flex; align-items: center;
  color: var(--text-soft); font-size: 16px;
  transition: color .18s ease, transform .18s ease;
  pointer-events: none;
}
.auth-input > input:focus ~ .auth-ico { color: var(--brand); transform: scale(1.08); }
/* show/hide password eye */
.auth-eye {
  position: absolute; top: 0; bottom: 0; inset-inline-end: 6px;
  width: 40px; display: grid; place-items: center;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-soft); font-size: 15px; border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.auth-eye:hover { color: var(--brand); background: var(--brand-soft); }

/* premium submit button with shimmer */
.auth-submit {
  position: relative; overflow: hidden;
  width: 100%; height: 54px;
  border: none; border-radius: 14px; cursor: pointer;
  font-size: 15.5px; font-weight: 700; color: #fff; letter-spacing: .3px;
  background: linear-gradient(135deg, #2f7fd6, #1e5fb4 60%, #16386b);
  box-shadow: 0 12px 30px rgba(30,95,180,.40);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(30,95,180,.50); filter: brightness(1.05); }
.auth-submit:active { transform: translateY(0); }
.auth-submit::after {
  content: ""; position: absolute; top: 0; inset-inline-start: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  transition: inset-inline-start .6s ease;
}
.auth-submit:hover::after { inset-inline-start: 130%; }
.auth-submit .spin { display: none; }
.auth-submit.is-loading .label { opacity: .7; }
.auth-submit.is-loading .spin {
  display: inline-block; width: 17px; height: 17px;
  border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-foot { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--text-soft);
  animation: rise .6s .72s cubic-bezier(.16,1,.3,1) both; }

/* notes inside the form */
.auth-form-panel .note { border-radius: 12px; animation: rise .5s .3s ease both; }

/* ---- responsive: stack to a single glass card on small screens ---- */
@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 460px; min-height: 0; }
  .auth-brand { padding: 34px 32px; }
  .auth-brand-mid, .auth-brand-points { display: none; }
  .auth-brand { flex-direction: row; align-items: center; }
  .auth-form-panel { padding: 36px 32px 34px; }
  .auth-brand-head { font-size: 26px; }
}
@media (max-width: 480px) {
  .auth-form-panel { padding: 30px 22px 28px; }
  .auth-brand { padding: 26px 24px; }
}

/* ---- reduced motion: respect user preference, kill all animation ---- */
@media (prefers-reduced-motion: reduce) {
  .auth-wrap *, .auth-shell, .auth-aurora span, .auth-brand::after { animation: none !important; }
}
