:root{
  --bg:#ffffff;
  --border:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;
  --primary:#2f57c7;
  --primary-2:#264bb0;
  --radius:14px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100svh;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 16px;
}

/* =========================
   Layout
========================= */
.auth-wrap{
  width: min(520px, 100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 18px;
}

.card{
  width: min(440px, 100%);
  padding-top: 6px;
}

/* =========================
   Logo
========================= */
.logo-box{
  width: 150px !important;
  height: 150px !important;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 6px;
}

.logo-img{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* =========================
   Fields
========================= */
.field{
  position:relative;
  width:100%;
  margin: 14px 0;
}

.input{
  width:100%;
  height: 56px;
  border-radius: var(--radius);
  border:1px solid var(--border);
  background:#fff;
  padding: 0 50px 0 48px;
  font-size: 16px;
  outline:none;
  transition:.15s ease;
  box-shadow: 0 8px 22px rgba(0,0,0,.03);
}

/* floating label — ثابت */
.placeholder-label{
  position:absolute;
  top:50%;
  right:48px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  pointer-events:none;
  transition: .15s ease;
  background:#fff;
  padding: 0 6px;
}

/* Icons */
.icon-right, .icon-left{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  color:#9ca3af;
  font-size: 20px;
  pointer-events:none;
}
.icon-right{ right:16px; }
.icon-left{ left:16px; }

/* Focus style */
.input:focus{
  border-color: rgba(47,87,199,.55);
  box-shadow: 0 10px 30px rgba(47,87,199,.12);
}

/* Label up on focus */
.input:focus + .placeholder-label{
  top:0;
  right:18px;
  font-size:12px;
  color: rgba(47,87,199,.92);
}

/* Label stays up when input has value:
   - valid works for email/password because both required
   - also covers browser autofill */
.input:valid + .placeholder-label{
  top:0;
  right:18px;
  font-size:12px;
  color: rgba(47,87,199,.92);
}

/* Autofill fix */
input:-webkit-autofill{
  -webkit-text-fill-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

/* =========================
   Button
========================= */
.btn{
  width:100%;
  height: 58px;
  border:0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color:#fff;
  font-size: 18px;
  font-weight: 700;
  cursor:pointer;
  margin-top: 8px;
  box-shadow: 0 14px 30px rgba(47,87,199,.25);
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(47,87,199,.28);
}
.btn:active{
  transform: translateY(0);
  opacity:.95;
}

/* =========================
   Helper
========================= */
.helper{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.remember{
  display:flex;
  align-items:center;
  gap: 8px;
  cursor:pointer;
  user-select:none;
}

.remember input{
  width:16px;
  height:16px;
}

.forgot{
  color: rgba(47,87,199,.95);
  font-weight:600;
  text-decoration:none;
}
.forgot:hover{
  text-decoration:underline;
}

/* =========================
   Errors
========================= */
.errors{
  width: min(440px, 100%);
  border:1px solid #fecaca;
  background:#fff1f2;
  color:#991b1b;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
}
.errors-title{
  font-weight: 800;
  margin-bottom: 6px;
}
.errors-list{
  margin:0;
  padding: 0 18px;
}

/* =========================
   Mobile
========================= */
@media (max-width: 360px){
  .logo-box{ width: 120px; height: 120px; }
  .input{ height: 54px; font-size: 15px; }
  .btn{ height: 56px; font-size: 17px; }
}
