:root{
  --brand: var(--primary, #164f59);
  --accent: var(--secondary, #daac18);
  --text: #0f172a;
  --muted: rgba(15, 23, 42, .65);
  --card: #ffffff;
  --cardBorder: rgba(255,255,255,.16);
  --shadow: 0 30px 80px rgba(0, 0, 0, .22);
  --radius: 22px;
}

html,body{height:100%;}
body{
  margin:0;
  font-family: 'Tajawal', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--brand);
  color: var(--text);
}

.auth-page{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 36px 18px;
}

.auth-card{
  width: min(460px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 28px 22px;
}

.auth-card--wide{
  width: min(920px, 100%);
}

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

.auth-card__logo{
  max-height: 56px;
  width: auto;
  display:block;
  margin: 0 auto 10px;
}

.auth-card__brand{
  font-weight: 900;
  color: rgba(15, 23, 42, .78);
  font-size: 13px;
  margin-bottom: 8px;
}

.auth-card__title{
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -.3px;
}

.auth-card__subtitle{
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.auth-alert{
  margin-top: 12px;
  text-align: right;
}

.auth-hr{
  border: 0;
  height: 1px;
  background: rgba(2, 6, 23, .10);
  margin: 18px 0;
}

.field{
  margin-bottom: 14px;
  position:relative;
}

.field input{
  width:100%;
  height:54px;
  border-radius: 14px;
  border:1px solid rgba(2, 6, 23, .14);
  background:#fff;
  color:var(--text);
  padding-inline-start: 14px;
  padding-inline-end: 54px;
  outline:none;
  transition: box-shadow .18s ease, border-color .18s ease;
  text-align: right;
  font-size:15px;
  font-family: inherit;
}

.field input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}

.toggle-pass{
  position:absolute;
  inset-inline-end:10px;
  top:50%;
  transform:translateY(-50%);
  height:38px;
  min-width:44px;
  border-radius: 12px;
  border:1px solid rgba(2, 6, 23, .12);
  background: rgba(2, 6, 23, .03);
  color: rgba(15, 23, 42, .72);
  cursor:pointer;
}

.toggle-pass:focus{
  outline:none;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}

.btn-login{
  width:100%;
  height:54px;
  border:none;
  border-radius: 14px;
  font-weight: 900;
  font-size:16px;
  color:#ffffff;
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .20);
  transition: transform .12s ease, filter .12s ease;
}

.btn-login:hover{transform:translateY(-1px); filter:saturate(1.05);}
.btn-login:active{transform:translateY(0);}
.btn-login:focus{outline:none; box-shadow: 0 0 0 4px rgba(255,255,255,.22);}

.login-links{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(2, 6, 23, .10);
  text-align:center;
}

.login-links p{
  margin:0 0 6px;
  color: rgba(15, 23, 42, .62);
  font-size:13px;
}

.login-links a{
  color: var(--brand);
  font-weight: 900;
  text-decoration:none;
}

.login-links a:hover{text-decoration:underline;}

.preloader{
  position:fixed;
  inset:0;
  background: var(--brand);
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
}

.spinner{
  width:46px;height:46px;
  border-radius:999px;
  border:3px solid rgba(255,255,255,.22);
  border-top-color:var(--accent);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  animation:spin 1s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg)}}

@media (max-width: 420px){
  .auth-card{ padding: 22px 18px 18px; }
}
