/* =========================================================
   Auth pages - cleaner cinematic background
   ========================================================= */


/* Full-bleed auth layout inside global .page/.container wrappers */
.page{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.page > .container{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.auth-container{
  min-height: 100dvh;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: grid;
  place-items: center;
  padding: 48px 18px 92px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(56,189,248,.18), transparent 62%),
    radial-gradient(900px 420px at 100% 0%, rgba(245,158,11,.13), transparent 58%),
    linear-gradient(180deg, rgba(4,10,24,.92), rgba(7,16,34,.86));
}

.auth-container::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 42%, black 45%, transparent 92%);
  opacity: .45;
  pointer-events: none;
  z-index: 0;
}

.auth-container::after{
  content: "";
  position: absolute;
  width: 820px;
  height: 820px;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.12), rgba(56,189,248,0) 62%);
  filter: blur(18px);
  opacity: .7;
  pointer-events: none;
  z-index: 0;
}

.auth-card{
  width: min(500px, 100%);
  padding: 28px 26px 24px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(155deg, rgba(8,19,40,.9), rgba(10,26,54,.78));
  box-shadow: 0 28px 80px rgba(2,8,23,.55), inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}

.auth-card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(56,189,248,.56), rgba(247,183,51,.44));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .8;
}

.auth-card h1{
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.auth-card__header{ text-align: center; margin-bottom: 2px; }
.auth-subtitle{ margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.auth-form{ display: grid; gap: 14px; margin-top: 12px; }
.input-group{ display: grid; gap: 6px; }
.auth-form label{ display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.input-row{ display: flex; gap: 8px; align-items: center; }
.input-row .input{ flex: 1; }

.auth-form .input{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.auth-form .input:focus{
  border-color: rgba(56,189,248,.75);
  box-shadow: 0 0 0 3px rgba(56,189,248,.2), 0 8px 24px rgba(2,132,199,.2);
  background: rgba(255,255,255,.09);
}

.auth-form .input::placeholder{ color: rgba(220,226,233,.58); }

.password-toggle{
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}

.password-toggle:hover{ border-color: rgba(255,255,255,.36); background: rgba(255,255,255,.14); transform: translateY(-1px); }
.password-toggle:active{ transform: translateY(0); }
.auth-helper{ margin: 0; font-size: 11px; color: var(--muted-2); font-style: italic; }
.password-strength{ margin-top: 10px; display: grid; gap: 6px; }
.password-strength__bar{ height: 8px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); overflow: hidden; }
.password-strength__bar span{ display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ef4444 0%, #f59e0b 46%, #22c55e 100%); transition: width .24s ease; }
.password-strength__text{ font-size: 12px; color: var(--muted); font-weight: 600; }
.password-requirements{
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.65);
}
.password-requirements li{
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-requirements li::before{
  content: "●";
  font-size: 10px;
  line-height: 1;
  color: rgba(255,255,255,.35);
  transition: color .2s ease;
}
.password-requirements li.satisfied::before{
  color: #22c55e;
}
.password-requirements li.satisfied{
  color: rgba(255,255,255,.92);
}

.auth-form-actions{
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,.5);
  background: linear-gradient(135deg, #0284c7, #1d4ed8 55%, #1e40af);
  color: #f8fbff;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(3,105,161,.32);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.auth-form-actions:hover{ transform: translateY(-1px); box-shadow: 0 18px 32px rgba(3,105,161,.4); filter: brightness(1.04); }
.auth-form-actions:disabled{ opacity: .72; cursor: wait; }
.auth-link-text{ margin: 16px 0 0; text-align: center; color: var(--muted); }
.auth-link{ color: var(--accent-2); font-weight: 800; }
.auth-link:hover{ text-decoration: underline; }

body[data-theme="clair"] .auth-container{
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(2,132,199,.16), transparent 60%),
    radial-gradient(900px 430px at 100% 0%, rgba(245,158,11,.12), transparent 58%),
    linear-gradient(180deg, #eef4fb, #f8fbff 52%, #eef5ff);
}

body[data-theme="clair"] .auth-container::before{
  background-image:
    linear-gradient(rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.045) 1px, transparent 1px);
  opacity: .38;
}

body[data-theme="clair"] .auth-container::after{
  background: radial-gradient(circle, rgba(2,132,199,.1), rgba(2,132,199,0) 62%);
}

body[data-theme="clair"] .auth-card{
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(247,251,255,.9));
  border-color: rgba(15,23,42,.12);
  box-shadow: 0 24px 56px rgba(15,23,42,.14), inset 0 1px 0 rgba(255,255,255,.95);
}

body[data-theme="clair"] .auth-form label{ color: #334155; }
body[data-theme="clair"] .auth-form .input{ background: rgba(255,255,255,.92); border-color: rgba(148,163,184,.45); color: #0f172a; }
body[data-theme="clair"] .auth-form .input::placeholder{ color: rgba(51,65,85,.55); }
body[data-theme="clair"] .auth-form .input:focus{ border-color: rgba(2,132,199,.72); box-shadow: 0 0 0 3px rgba(2,132,199,.18), 0 8px 20px rgba(2,132,199,.12); background: #fff; }
body[data-theme="clair"] .password-toggle{ background: rgba(255,255,255,.95); border-color: rgba(148,163,184,.5); color: #0f172a; }
body[data-theme="clair"] .password-toggle:hover{ background: #fff; border-color: rgba(71,85,105,.62); }
body[data-theme="clair"] .password-strength__bar{ background: rgba(148,163,184,.2); border-color: rgba(148,163,184,.32); }

@media (max-width: 520px){
  .auth-container{ padding: 32px 14px 70px; }
  .auth-card{ padding: 22px 16px; border-radius: 20px; }
}
