html, body{
  height: 100%;
  overflow: hidden;
}

:root{
  --primary-color: #ffd700;
  --secondary-color: #e7e9ee;
  --bg-dark: #0d1117;
  --bg-dark-2: #141a25;
  --border-color: rgba(255,255,255,0.08);
}

body{
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: radial-gradient(900px 480px at 20% -10%, rgba(255,215,0,0.12), transparent 70%),
              linear-gradient(180deg, #0b0f16 0%, #0d1117 60%, #0a0e15 100%);
  color: var(--secondary-color);
  min-height: 100vh;
  overflow: hidden;
}

body::before{
  content: "";
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 10px),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 12px);
  opacity: 0.45;
  filter: blur(0.2px);
  animation: textureDrift 28s linear infinite;
}

@keyframes textureDrift{
  0%{ transform: translate3d(0, 0, 0); }
  100%{ transform: translate3d(-6%, -4%, 0); }
}

.login-page{
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 16px;
  gap: 10px;
}

.login-alert{
  min-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #f87171;
  padding: 10px 14px;
  border-radius: 12px;
  width: min(480px, 100%);
  text-align: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  margin-bottom: 8px;
}

.auth-tabs{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}

.auth-tab{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--secondary-color);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-tab:hover{
  transform: translateY(-1px);
  border-color: rgba(255,215,0,0.4);
}

.auth-tab.is-active{
  background: rgba(255,215,0,0.16);
  border-color: rgba(255,215,0,0.4);
  color: #f7d75d;
}

.auth-panel{
  display: block;
}

.auth-panel.is-hidden{
  display: none;
}


.form-divider{
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  color: rgba(231,233,238,0.5);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.form-divider::before,
.form-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.form-divider span{
  padding: 0 10px;
}

.link-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-cta:hover{
  transform: translateY(-1px);
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.08);
}

.link-cta.secondary{
  background: rgba(255,255,255,0.04);
}

.login-alert.is-visible{
  min-height: auto;
  opacity: 1;
  transform: translateY(0);
}

.login-card{
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, rgba(20,26,37,0.96) 0%, rgba(12,16,25,0.96) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(3,7,18,0.6);
  position: relative;
  overflow: hidden;
}

.login-card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,215,0,0.4), rgba(255,255,255,0.05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-header{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.brand-mark{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.3);
}

.brand-mark svg{
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.brand-text h1{
  font-size: 1.5rem;
  margin: 6px 0 6px 0;
}

.brand-text p{
  margin: 0;
  color: rgba(231,233,238,0.72);
  font-size: 0.95rem;
}

.badge{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(255,215,0,0.16);
  color: #f7d75d;
  border: 1px solid rgba(255,215,0,0.4);
}


.login-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-links{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.back-home{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  cursor: pointer;
}

.back-home svg{
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-home:hover{
  background: rgba(255,255,255,0.12);
}


.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form label{
  font-weight: 600;
  color: var(--secondary-color);
}

.required{color: #f97316; margin-left: 4px;}

.login-form input{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(9,12,18,0.86);
  color: var(--secondary-color);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus{
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.15);
}

.btn{
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.btn.primary{
  background: linear-gradient(135deg, #fbd34d, #ffb14a);
  color: #2b1b08;
}

.btn.secondary{
  background: rgba(255,255,255,0.08);
  color: var(--secondary-color);
  border: 1px solid rgba(255,255,255,0.14);
}

.center-btn{
  align-self: center;
  width: fit-content;
}

.password-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-row input{flex:1}

.icon-only{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  cursor: pointer;
}

.icon-only svg{
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.primary{
  background: linear-gradient(180deg, var(--primary-color), #e6c100);
  color: #0b1220;
  box-shadow: none;
}

.login-hint{
  color: rgba(231,233,238,0.6);
  font-size: 0.82rem;
}

.login-footer{
  position: static;
  text-align: center;
  color: rgba(231,233,238,0.55);
  font-size: 0.78rem;
}
