/* =========================================================
   AUTH (clean)
   - Works with templates/layout/auth.php (no header/footer)
   - Sign Up: <section class="st-auth st-auth--split st-auth--signup">
   - Left column: Title -> Gift -> Subtitle (centered gift + centered subtitle)
   ========================================================= */

/* =========================
   TOKENS
   ========================= */
:root{
  --st-landing-bg:#060A12;

  --st-auth-text:#f9fbff;
  --st-auth-muted:rgba(148,163,184,.92);
  --st-auth-muted-2:rgba(148,163,184,.82);

  --st-auth-card-border:rgba(148,163,184,.26);
  --st-auth-card-bg-1:rgba(15,23,42,.92);
  --st-auth-card-bg-2:rgba(15,23,42,.80);

  --st-auth-input-bg:rgba(15,23,42,.94);
  --st-auth-input-border:rgba(148,163,184,.60);

  --st-auth-radius-lg:22px;
  --st-auth-radius-md:12px;

  /* Brand gradient (title accent + submit button) */
  --st-brand-grad:linear-gradient(90deg,#0cc0df,#004aad);

  /* Gift: pure white */
  --st-gift-color:rgba(255,255,255,.96);

  /* ✅ Link color for auth (white + subtle glow) */
  --st-auth-link-white:rgba(255,255,255,.95);
  --st-auth-link-glow:0 0 12px rgba(255,255,255,.12);
}

/* =========================
   PAGE BASE
   ========================= */
html,body{height:100%;background:var(--st-landing-bg);}
body{margin:0;}

/* =========================================================
   PAGE WRAP
   ========================================================= */
.st-auth{
  min-height:100vh;
  background:var(--st-landing-bg);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:56px 18px;
}

.st-auth-shell{width:100%;}

/* =========================================================
   SPLIT LAYOUT (register.php)
   ========================================================= */
.st-auth--signup.st-auth--split .st-auth-shell{
  max-width:1180px;
  width:100%;
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:64px;
  align-items:center;
}

/* =========================================================
   LEFT COLUMN (clean composition)
   ========================================================= */
.st-auth--signup .st-auth-left{padding:10px 0;}

/* ✅ keep title aligned left, but center gift + subtitle inside this inner */
.st-auth--signup .st-auth-left__inner{
  max-width:640px;
}

/* Title (slightly smaller + less “toy”) */
.st-auth--signup .st-auth-left__title{
  margin:0 0 14px;
  font-size:clamp(2.55rem,3.35vw,3.55rem);
  font-weight:740;
  line-height:1.04;
  letter-spacing:-0.028em;
  color:#f8fbff;
}

/* Accent: brand gradient on “3 free analyses” */
.st-auth--signup .st-auth-left__title-accent{
  background:-webkit-linear-gradient(90deg,#0cc0df,#004aad);
  background:var(--st-brand-grad);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
}

/* ✅ Gift (centered in the LEFT column + smaller) */
.st-auth--signup .st-auth-left__gift{
  margin:14px 0 14px;
  width:min(175px,38%);
  aspect-ratio:1/1;

  display:flex;
  align-items:center;
  justify-content:center;

  margin-left:auto;
  margin-right:auto;
}

/* SVG: white + subtle depth */
.st-auth--signup .st-auth-left__gift svg{
  width:100%;
  height:100%;
  display:block;
  filter:
    drop-shadow(0 14px 28px rgba(0,0,0,.42))
    drop-shadow(0 0 16px rgba(255,255,255,.08));
}

/* Force fill color for all paths */
.st-auth--signup .st-auth-left__gift svg path,
.st-auth--signup .st-auth-left__gift svg .st0{
  fill:var(--st-gift-color) !important;
}

/* ✅ Subtitle centered (and a bit smaller) */
.st-auth--signup .st-auth-left__subtitle{
  margin:0;
  font-size:1.04rem;
  line-height:1.62;
  color:rgba(226,232,240,.88);
  max-width:58ch;

  text-align:center;
  margin-left:auto;
  margin-right:auto;
}

/* =========================================================
   RIGHT COLUMN (card)
   ========================================================= */
.st-auth--signup .st-auth-right{
  display:flex;
  justify-content:flex-end;
}

.st-auth-card{
  position:relative;
  width:100%;
  max-width:560px;

  padding:34px 28px 26px;
  border-radius:var(--st-auth-radius-lg);

  border:1px solid var(--st-auth-card-border);
  background:linear-gradient(135deg,var(--st-auth-card-bg-1),var(--st-auth-card-bg-2));
  box-shadow:
    0 16px 46px rgba(15,23,42,.78),
    0 0 26px rgba(15,23,42,.90);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);

  transition:box-shadow .25s ease,transform .18s ease,border-color .25s ease;
}

.st-auth-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  background:radial-gradient(circle at 0 0, rgba(56,189,248,.22), transparent 55%);
  opacity:.22;
  pointer-events:none;
  mix-blend-mode:screen;
}

.st-auth-card:hover{
  transform:translateY(-3px);
  border-color:rgba(248,250,252,.35);
  box-shadow:
    0 22px 60px rgba(15,23,42,.88),
    0 0 34px rgba(12,192,223,.30);
}

/* Header */
.st-auth-header--clean{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 18px;
}

.st-auth-logo{
  flex:0 0 auto;
  width:62px;
  height:62px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.st-auth-logo img{
  display:block;
  width:54px;
  height:54px;
  object-fit:contain;
  filter:
    drop-shadow(0 10px 22px rgba(0,0,0,.55))
    drop-shadow(0 0 14px rgba(12,192,223,.25));
}

.st-auth-header-main{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.st-auth-title{
  margin:0;
  font-size:1.55rem;
  font-weight:650;
  color:var(--st-auth-text);
}

.st-auth-subtitle{
  margin:0;
  font-size:.95rem;
  line-height:1.45;
  color:var(--st-auth-muted-2);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.st-auth-google,
.st-auth-emailToggle{
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:11px 14px;
  border-radius:var(--st-auth-radius-md);
  border:1px solid rgba(148,163,184,.70);
  background:rgba(15,23,42,.96);
  color:#e5f2ff;

  font-size:.96rem;
  font-weight:600;
  cursor:pointer;

  box-shadow:
    0 10px 24px rgba(15,23,42,.86),
    0 0 18px rgba(15,23,42,.95);

  transition:transform .15s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease;
}

.st-auth-google-icon{
  width:28px;
  height:28px;
  border-radius:999px;
  background:rgba(10,15,26,.80);
  display:flex;
  align-items:center;
  justify-content:center;
}

.st-auth-google-icon img{
  display:block;
  width:18px;
  height:18px;
  object-fit:contain;
}

.st-auth-google:hover,
.st-auth-emailToggle:hover{
  transform:translateY(-1px);
  border-color:rgba(248,250,252,.90);
  background:rgba(15,23,42,.98);
  box-shadow:
    0 14px 32px rgba(15,23,42,.94),
    0 0 26px rgba(56,189,248,.22);
}

.st-auth-google:focus-visible,
.st-auth-emailToggle:focus-visible{
  outline:2px solid rgba(56,189,248,.90);
  outline-offset:2px;
}

/* Email toggle icon */
.st-auth-emailToggleIcon{
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.92;
}
.st-auth-emailToggleIcon svg{width:18px;height:18px;display:block;}
.st-auth-emailToggleIcon svg *{stroke:rgba(255,255,255,.92);}

/* Divider */
.st-auth-divider{
  margin:18px 0 14px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:.78rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(148,163,184,.78);
}
.st-auth-divider-line{
  flex:1;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(148,163,184,.55),transparent);
}
.st-auth-divider-label{white-space:nowrap;}

/* =========================================================
   FORM
   ========================================================= */
.st-auth-emailArea{margin-top:10px;}
.st-auth-emailArea:not([hidden]){animation:stAuthFadeIn 220ms ease both;}
@keyframes stAuthFadeIn{
  from{opacity:0;transform:translateY(-4px);}
  to{opacity:1;transform:translateY(0);}
}

.st-auth-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.st-auth-field{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.st-auth-label{
  font-size:.86rem;
  color:rgba(209,213,219,.96);
}

.st-auth-input{
  border-radius:var(--st-auth-radius-md);
  border:1px solid var(--st-auth-input-border);
  background:var(--st-auth-input-bg);
  padding:10px 11px;
  font-size:.96rem;
  color:#e5f2ff;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.95);
}
.st-auth-input::placeholder{color:rgba(148,163,184,.90);}
.st-auth-input:focus{
  outline:none;
  border-color:rgba(56,189,248,.90);
  box-shadow:
    0 0 0 1px rgba(56,189,248,.85),
    0 0 12px rgba(56,189,248,.55);
}

/* Chrome autofill */
.st-auth-input:-webkit-autofill,
.st-auth-input:-webkit-autofill:hover,
.st-auth-input:-webkit-autofill:focus{
  -webkit-box-shadow:0 0 0 1000px rgba(15,23,42,.94) inset;
  -webkit-text-fill-color:#e5f2ff;
  caret-color:#e5f2ff;
}

.st-auth-hint{
  margin:2px 0 0;
  font-size:.78rem;
  color:rgba(148,163,184,.90);
}

/* Errors */
.st-auth-errors{
  margin:10px 0 10px;
  padding:10px 12px;
  border-radius:var(--st-auth-radius-md);
  border:1px solid rgba(248,113,113,.70);
  background:rgba(127,29,29,.85);
  color:#fee2e2;
  font-size:.86rem;
}

/* Consent */
.st-auth-consent{
  margin-top:4px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.st-auth-checkbox{
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:.84rem;
  line-height:1.45;
  color:rgba(148,163,184,.96);
}

.st-auth-checkbox input[type="checkbox"]{
  margin-top:2px;
  width:14px;
  height:14px;
  border-radius:4px;
}

/* ✅ FIX: Terms/Privacy links -> white, no underline, subtle glow */
.st-auth-checkbox a{
  color:var(--st-auth-link-white);
  text-decoration:none;
  font-weight:600;
  text-shadow:var(--st-auth-link-glow);
}
.st-auth-checkbox a:hover{
  text-decoration:none;
  opacity:.96;
}

/* Submit */
.st-auth-submit{
  margin-top:10px;
  width:100%;
  border:none;
  border-radius:var(--st-auth-radius-md);
  padding:11px 16px;
  font-size:.98rem;
  font-weight:700;
  cursor:pointer;
  color:#ffffff;

  background:-webkit-linear-gradient(90deg,#0cc0df,#004aad);
  background:var(--st-brand-grad);

  box-shadow:
    0 10px 26px rgba(0,74,173,.45),
    0 0 18px rgba(12,192,223,.55);

  transition:transform .16s ease,box-shadow .22s ease,opacity .18s ease;
}

.st-auth-submit:hover{
  transform:translateY(-1px);
  box-shadow:
    0 14px 34px rgba(0,74,173,.65),
    0 0 26px rgba(12,192,223,.75);
}

.st-auth-submit:focus-visible{
  outline:2px solid rgba(12,192,223,.90);
  outline-offset:2px;
}

/* Footer */
.st-auth-footer{
  margin:12px 0 0;
  font-size:.90rem;
  color:rgba(148,163,184,.98);
  text-align:center;
}

/* ✅ FIX: Footer links (Log in / Create account) -> white, no underline, subtle glow */
.st-auth-footer a{
  color:var(--st-auth-link-white);
  text-decoration:none;
  font-weight:600;
  text-shadow:var(--st-auth-link-glow);
}
.st-auth-footer a:hover{
  text-decoration:none;
  opacity:.96;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:980px){
  .st-auth--signup.st-auth--split .st-auth-shell{
    grid-template-columns:1fr;
    gap:28px;
    max-width:620px;
  }
  .st-auth--signup .st-auth-right{justify-content:stretch;}
  .st-auth-card{max-width:100%;}
  .st-auth--signup .st-auth-left__inner{max-width:100%;}

  .st-auth--signup .st-auth-left__gift{
    width:min(175px,60%);
  }
  .st-auth--signup .st-auth-left__subtitle{
    max-width:60ch;
  }
}

@media (max-width:600px){
  .st-auth{padding:42px 14px;}
  .st-auth-card{padding:26px 18px 22px;}

  .st-auth-logo{width:56px;height:56px;}
  .st-auth-logo img{width:48px;height:48px;}

  .st-auth--signup .st-auth-left__title{
    font-size:clamp(2.25rem,8.2vw,2.95rem);
  }
  .st-auth--signup .st-auth-left__subtitle{
    font-size:1.00rem;
  }
  .st-auth--signup .st-auth-left__gift{
    width:min(160px,70%);
  }
}

/* =========================================================
   LOG IN
   - Uses same card + controls as signup
   - No left column
   - Soft background focus (premium, Binance-like)
   ========================================================= */

/* Centered narrow layout */
.st-auth--login .st-auth-shell{
  max-width:560px;
  width:100%;
  display:flex;
  justify-content:center;
}

/* Card already styled globally */
.st-auth--login .st-auth-card{
  width:100%;
}

/* Soft background accent (behind the card) */
.st-auth--login{
  position:relative;
}

.st-auth--login::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  background:
    radial-gradient(
      620px 420px at 50% 45%,
      rgba(56,189,248,.09),
      transparent 60%
    );
}

/* Row under password: remember + forgot */
.st-auth--login .st-auth-row{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.st-auth--login .st-auth-remember{
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:.84rem;
  line-height:1.35;
  color:rgba(148,163,184,.96);
}

.st-auth--login .st-auth-remember input[type="checkbox"]{
  margin-top:2px;
  width:14px;
  height:14px;
  border-radius:4px;
}

/* ✅ FIX: Forgot password link -> white, no underline, subtle glow */
.st-auth--login .st-auth-link{
  color:var(--st-auth-link-white);
  text-decoration:none;
  font-size:.84rem;
  font-weight:600;
  white-space:nowrap;
  text-shadow:var(--st-auth-link-glow);
}
.st-auth--login .st-auth-link:hover{
  text-decoration:none;
  opacity:.96;
}

/* Responsive */
@media (max-width:600px){
  .st-auth--login .st-auth-row{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .st-auth--login::before{
    background:
      radial-gradient(
        520px 360px at 50% 42%,
        rgba(56,189,248,.10),
        transparent 62%
      );
  }
}
