/* ================= AUTH DARK THEME ================= */
:root{
  --brand1:#8b5cf6;
  --brand2:#06b6d4;
  --grad:linear-gradient(135deg,var(--brand1),var(--brand2));

  --bg1:#050816;
  --bg2:#0f172a;

  --card:rgba(15,23,42,.88);
  --text:#f8fafc;
  --muted:#94a3b8;
  --field:rgba(255,255,255,.05);

  --line:rgba(255,255,255,.10);
  --radius:26px;
  --shadow:0 25px 80px rgba(0,0,0,.45);
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
}

html,body{
  max-width:100%;
  overflow-x:hidden;
}

a{
  text-decoration:none;
  color:inherit;
}

input,
button{
  outline:none;
  font-family:inherit;
}

.goog-te-banner-frame.skiptranslate,
.goog-te-gadget,
.goog-te-gadget-icon{
  display:none !important;
}

body{
  top:0 !important;
}

/* ================= PAGE BACKGROUND ================= */
.login-page,
.signup-page,
.verify-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  color:var(--text);
  background:
    radial-gradient(900px 450px at 10% -10%,rgba(139,92,246,.18),transparent 60%),
    radial-gradient(900px 450px at 95% 0%,rgba(6,182,212,.16),transparent 55%),
    linear-gradient(180deg,var(--bg1),var(--bg2));
}

/* ================= CENTERED SIGNUP ================= */
.signup-page .auth-container{
  width:100%;
  min-height:calc(100vh - 48px);
  display:flex;
  align-items:center;
  justify-content:center;
}

/* remove image/decoration side */
.signup-page .auth-left{
  display:none !important;
}

.signup-page .shape,
.signup-page .triangle,
.signup-page .circle,
.signup-page .shield,
.signup-page .coin{
  display:none !important;
}

/* ================= CARDS ================= */
.login-card,
.auth-card,
.verify-card{
  width:100%;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter:blur(24px);
  position:relative;
  overflow:hidden;
}

.login-card::before,
.auth-card::before,
.verify-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(520px 180px at 0% 0%,rgba(139,92,246,.14),transparent 60%),
    radial-gradient(520px 180px at 100% 0%,rgba(6,182,212,.12),transparent 60%);
}

.login-page .login-card{
  max-width:460px;
  padding:36px 32px;
}

.signup-page .auth-card{
  width:100%;
  max-width:620px;
  padding:38px 36px;
}

.verify-page .verify-card{
  max-width:500px;
  padding:36px 32px;
}

/* keep content above glow */
.auth-card > *,
.login-card > *,
.verify-card > *{
  position:relative;
  z-index:1;
}

/* ================= TOP BAR ================= */
.auth-top,
.auth-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.back-home{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:14px;
  font-size:13px;
  color:#cbd5e1;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  transition:.18s ease;
}

.back-home:hover{
  color:#fff;
  border-color:rgba(139,92,246,.35);
  background:rgba(139,92,246,.12);
}

/* ================= LOGO ================= */
.logo{
  text-align:center;
  margin:8px 0 20px;
}

.logo .auth-logo{
  max-width:190px;
  max-height:70px;
  object-fit:contain;
  display:inline-block;
}

.logo .auth-name{
  display:block;
  font-size:26px;
  font-weight:1000;
  background:var(--grad);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.logo .auth-initials{
  display:inline-flex;
  width:58px;
  height:58px;
  border-radius:18px;
  align-items:center;
  justify-content:center;
  background:var(--grad);
  color:#fff;
  font-weight:1000;
  margin-bottom:10px;
}

/* ================= HEADINGS ================= */
h2,
.card-header h3{
  text-align:center;
  margin-bottom:8px;
  font-size:22px;
  font-weight:1000;
  color:#fff;
  letter-spacing:-.4px;
}

.subtitle,
.card-header p{
  text-align:center;
  font-size:14px;
  color:var(--muted);
  margin-bottom:22px;
}

/* ================= INPUTS ================= */
input{
  width:100%;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--field);
  color:#fff;
  margin-bottom:12px;
  min-height:50px;
  font-size:14px;
  transition:.18s ease;
}

input::placeholder{
  color:var(--muted);
}

input:focus{
  border-color:rgba(139,92,246,.48);
  box-shadow:0 0 0 4px rgba(139,92,246,.18);
}

/* ================= BUTTONS ================= */
button{
  width:100%;
  padding:14px;
  border-radius:16px;
  border:none;
  background:var(--grad);
  color:#fff;
  font-weight:950;
  cursor:pointer;
  min-height:52px;
  transition:.18s ease;
  box-shadow:0 18px 45px rgba(139,92,246,.24);
}

button:hover{
  transform:translateY(-1px);
  filter:brightness(1.04);
}

/* ================= PASSWORD TOGGLE ================= */
.password-group{
  position:relative;
}

.password-group input{
  padding-right:46px;
}

.password-toggle{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  cursor:pointer;
  color:#94a3b8;
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  user-select:none;
}

/* ================= FORM OPTIONS ================= */
.form-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:6px 0 18px;
  font-size:13px;
  color:var(--muted);
}

.form-options label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  line-height:16px;
  cursor:pointer;
}

.form-options input[type="checkbox"],
.login-page .form-options input[type="checkbox"]{
  all:unset;
  appearance:none;
  -webkit-appearance:none;
  width:16px;
  height:16px;
  border:2px solid var(--brand1);
  border-radius:4px;
  background:transparent;
  display:inline-block;
  flex:0 0 16px;
  position:relative;
  cursor:pointer;
}

.form-options input[type="checkbox"]:checked,
.login-page .form-options input[type="checkbox"]:checked{
  background:var(--brand1);
}

.form-options input[type="checkbox"]:checked::after,
.login-page .form-options input[type="checkbox"]:checked::after{
  content:"✓";
  position:absolute;
  color:#fff;
  font-size:12px;
  left:3px;
  top:-1px;
}

.forgot-link{
  color:#cbd5e1;
  font-weight:800;
}

.forgot-link:hover{
  color:var(--brand2);
}

/* ================= FOOTERS ================= */
.register-text,
.auth-footer,
.note{
  margin-top:18px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
}

.register-text a,
.auth-footer a{
  color:var(--brand2);
  font-weight:900;
}

.register-text a:hover,
.auth-footer a:hover{
  color:#fff;
}

/* ================= ALERTS ================= */
.error-box,
.alert-error,
.alert-success,
.success-box,
.info-box{
  border-radius:14px;
  padding:12px 14px;
  font-size:13px;
  margin:12px 0 18px;
  line-height:1.5;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
}

.alert-success,
.success-box{
  border-color:rgba(16,185,129,.25);
  background:rgba(16,185,129,.10);
}

.alert-error,
.error-box{
  border-color:rgba(239,68,68,.25);
  background:rgba(239,68,68,.10);
}

/* ================= TRANSLATE ================= */
.auth-lang{
  position:relative;
  z-index:200;
}

.lang-trigger{
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:#fff;
  cursor:pointer;
  font-weight:900;
  font-size:12.5px;
  white-space:nowrap;
  box-shadow:none;
}

.lang-trigger:hover{
  border-color:rgba(139,92,246,.35);
  background:rgba(139,92,246,.12);
}

.lang-menu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:min(280px,calc(100vw - 40px));
  max-height:min(360px,55vh);
  overflow:auto;
  padding:10px;
  border-radius:16px;
  background:rgba(15,23,42,.96);
  border:1px solid var(--line);
  box-shadow:0 18px 55px rgba(0,0,0,.55);
  backdrop-filter:blur(18px);
  display:none;
}

#langDD.open .lang-menu{
  display:block;
}

.lang-menu button{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-align:left;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:#fff;
  cursor:pointer;
  font-weight:800;
  font-size:13px;
  min-height:44px;
  box-shadow:none;
}

.lang-menu button:hover{
  border-color:rgba(139,92,246,.35);
  background:rgba(139,92,246,.12);
}

.lang-menu::-webkit-scrollbar{
  width:0;
  height:0;
}

.lang-menu{
  scrollbar-width:none;
  -ms-overflow-style:none;
}

/* ================= ERRORS ================= */
.field-error{
  margin:-6px 0 10px;
  font-size:12px;
  color:#fca5a5;
  line-height:1.3;
}

.is-invalid{
  border-color:rgba(239,68,68,.70) !important;
  box-shadow:0 0 0 4px rgba(239,68,68,.16) !important;
}

/* ================= RESPONSIVE ================= */
@media(max-width:900px){
  .signup-page .auth-container{
    flex-direction:column;
    justify-content:center;
  }

  .signup-page .auth-card{
    max-width:620px;
  }
}

@media(max-width:640px){
  .login-page,
  .signup-page,
  .verify-page{
    padding:14px;
  }

  .signup-page .auth-card{
    max-width:100%;
    padding:28px 20px;
    border-radius:22px;
  }

  .login-page .login-card,
  .verify-page .verify-card{
    padding:26px 20px;
  }

  .auth-top,
  .auth-head{
    flex-wrap:wrap;
  }

  .auth-lang{
    margin-left:auto;
  }

  .lang-menu{
    position:fixed;
    top:70px;
    left:12px;
    right:12px;
    width:auto;
    max-height:50vh;
    border-radius:18px;
    z-index:9999;
  }
}

@media(max-width:360px){
  h2,
  .card-header h3{
    font-size:19px;
  }

  .lang-trigger{
    padding:0 10px;
    font-size:12px;
  }
}