/* ================= ROOT ================= */

:root{
  --primary:#2563eb;
  --bg:#f9fafb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
}

/* ================= RESET ================= */


/* ================= DEMO BUTTON ================= */

.open-auth-btn{
  margin:80px auto;
  display:block;
  padding:12px 22px;
  font-size:16px;
  background:var(--primary);
  color:#fff;
  border:none;
  border-radius:8px;
  cursor:pointer;
}

/* ================= OVERLAY ================= */

.auth-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999;
}

.auth-overlay.active{
  display:flex;
  animation:fade .2s ease;
}

@keyframes fade{
  from{opacity:0}
  to{opacity:1}
}

/* ================= MODAL ================= */

.auth-modal{
  width:100%;
  max-width:420px;
  background:var(--card);
  border-radius:14px;
  padding:22px;
  position:relative;
  animation:scale .25s ease;
}

@keyframes scale{
  from{transform:scale(.9);opacity:0}
  to{transform:scale(1);opacity:1}
}

/* ================= CLOSE ================= */

.auth-close{
  position:absolute;
  top:12px;
  right:14px;
  font-size:22px;
  cursor:pointer;
  color:var(--muted);
}

/* ================= HEADER ================= */

.auth-header{
  text-align:center;
  margin-bottom:18px;
}

.auth-header h2{
  margin:0;
}

.auth-header p{
  font-size:13px;
  color:var(--muted);
}

/* ================= TOGGLE ================= */

.auth-toggle{
  display:flex;
  background:#f3f4f6;
  border-radius:10px;
  margin-bottom:18px;
}

.auth-toggle button{
  flex:1;
  padding:10px;
  border:none;
  background:none;
  cursor:pointer;
  font-weight:600;
}

.auth-toggle button.active{
  background:#fff;
  border-radius:10px;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
}

/* ================= FORM ================= */

.auth-form{
  display:none;
}

.auth-form.active{
  display:block;
}

.auth-group{
  margin-bottom:14px;
}

.auth-group label{
  font-size:13px;
  margin-bottom:4px;
  display:block;
}

.auth-group input{
  width:100%;
  padding:11px 12px;
  border-radius:8px;
  border:1px solid var(--border);
  outline:none;
  font-size:14px;
}

.auth-group input:focus{
  border-color:var(--primary);
}

/* ================= BUTTON ================= */

.auth-btn{
  width:100%;
  padding:12px;
  background:var(--primary);
  border:none;
  color:#fff;
  border-radius:8px;
  font-size:15px;
  cursor:pointer;
  margin-top:6px;
}

/* ================= DIVIDER ================= */

.auth-divider{
  display:flex;
  align-items:center;
  gap:10px;
  margin:16px 0;
  font-size:13px;
  color:var(--muted);
}

.auth-divider::before,
.auth-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--border);
}

/* ================= GOOGLE ================= */

.google-btn{
  width:100%;
  padding:10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:14px;
}

/* ================= FOOTER ================= */

.auth-footer{
  text-align:center;
  font-size:13px;
  margin-top:10px;
  color:var(--muted);
}

/* ================= ERROR ================= */

.auth-error{
  background: #fff5f5;
  color: #e53e3e;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-top: 15px;
  display: none;
  text-align: center;
  border: 1px solid #fed7d7;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(229, 62, 62, 0.05);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= RESPONSIVE ================= */

@media(max-width:480px){

  .auth-modal{
    max-width:95%;
    padding:18px;
  }

  .auth-header h2{
    font-size:20px;
  }

}
