/* ===========================
   LOGIN PAGE ONLY
   =========================== */
:root{
  --log-bg:#0f141c;
  --log-card:#141b24;
  --log-line:#1f2732;
  --log-text:#e9eef5;
  --log-muted:#9aa6b2;
  --log-accent:#E50914;  /* брэндийн улаан */
}

.log{
  max-width: 560px;
  margin: 64px auto 96px;
  padding: 0 16px;
  color: var(--log-text);
}

/* ГАРЧИГ – төвд улаан, register-тэй адил */
.log__title{
  margin: 0 0 18px;
  text-align: center;
  color: var(--log-accent);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: .2px;
}

/* BOX */
.log__card{
  background: var(--log-card);
  border: 1px solid var(--log-line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,1);
}

/* FIELDS – доош нь цувуулсан */
.log__field{ display:block; margin-bottom: 14px; }

.log__field label{
  display:block;
  font-size: 14px;
  color: var(--log-muted);
  margin: 0 0 6px;
}

.log__field input[type="text"],
.log__field input[type="email"],
.log__field input[type="password"]{
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--log-line);
  background: var(--log-bg);
  color: var(--log-text);
  padding: 0 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.log__field input:focus{
  border-color: color-mix(in srgb, var(--log-accent) 45%, var(--log-line));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--log-accent) 18%, transparent);
  background: #0d131b;
}

/* Санах / Forgot мөр */
.log__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 4px 0 16px;
}
.log-check{
  display:inline-flex; align-items:center; gap:8px;
  font-size:14px; color:var(--log-muted);
}
.log-check input{ width:16px; height:16px; accent-color: var(--log-accent); }
.log__forgot{ font-size:14px; color:var(--log-text); text-underline-offset:3px; opacity:.86; }
.log__forgot:hover{ opacity:1; }

/* ТОВЧНУУД – том улаан, бичиг ТОД (фонтыг өөрчлөхгүй) */
.log__actions{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}

.log-btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:50px; border-radius:14px; border:1px solid var(--log-line);
  text-decoration:none; user-select:none; cursor:pointer;
  /* бичиг ТОД харагдуулах — фонтыг өөрчлөхгүй */
  color:#fff; font-weight:900; font-size:16px; letter-spacing:.2px;
  font-family: inherit;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: transform .12s, box-shadow .12s, opacity .12s, background .12s, border-color .12s;
}

.log-btn--primary{
  background: var(--log-accent);
  border-color: color-mix(in srgb, var(--log-accent) 60%, #000);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--log-accent) 42%, transparent);
}
.log-btn--primary:hover{ transform: translateY(-1px); }
.log-btn--primary:active{ transform: translateY(0); opacity: .96; }

/* Ghost (саарал) нэвтрэх/бүртгүүлэх товч */
.log-btn--ghost{
  background:#1a2430; color: var(--log-text);
  border-color: color-mix(in srgb, var(--log-accent) 35%, var(--log-line));
}
.log-btn--ghost:hover{ border-color: var(--log-accent); }

/* MOBILE */
@media (max-width:520px){
  .log{ margin-top:40px; }
  .log__title{ font-size:30px; }
  .log__card{ padding:18px; border-radius:14px; }
  .log__actions{ grid-template-columns:1fr; }
}
/* ==== FIX: Chrome/Edge autofill white background on login inputs ==== */
.log__field input:-webkit-autofill,
.log__field input:-webkit-autofill:hover,
.log__field input:-webkit-autofill:focus,
.log__field input:autofill {
  /* Autofill шар/цагаан overlay-г дарна */
  -webkit-box-shadow: 0 0 0 1000px var(--log-bg) inset !important;
          box-shadow: 0 0 0 1000px var(--log-bg) inset !important;
  -webkit-text-fill-color: var(--log-text) !important;
  caret-color: var(--log-text) !important; font-size: 16px
  border-color: color-mix(in srgb, var(--log-accent) 45%, var(--log-line)) !important;
  /* Chrome шинэчилж фон солихыг сааруулна */
  transition: background-color 9999s ease-in-out 0s !important;
  background-clip: padding-box !important;
}

/* Фокус үед ч өнгө өөрчлөгдөхгүй */
.log__field input:focus:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--log-bg) inset, 0 0 0 5px color-mix(in srgb, var(--log-accent) 18%, transparent) !important;
          box-shadow: 0 0 0 1000px var(--log-bg) inset, 0 0 0 5px color-mix(in srgb, var(--log-accent) 18%, transparent) !important;
}
/* ==== Forgot link → #E50914 ==== */
.log__forgot{
  color: #E50914 !important;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.log__forgot:hover,
.log__forgot:focus-visible{
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* ==== "Санах" → #E50914 (Forgot-той ижил) ==== */
.log-check{
  color: #E50914 !important;
  font-weight: 400;
  font-size: 16px
}
.log-check input{
  accent-color: #E50914 !important;
}
.log-check input:focus-visible{
  outline: 2px solid #E50914;
  outline-offset: 2px;
}
/* ==== LOGIN: Alert ==== */
.log__alert{
  margin:12px 0 16px;
  padding:12px 14px;
  border:1px solid #E50914;
  color:#ffd5d7;
  background:rgba(229,9,20,.08);
  border-radius:10px;
  font-size:14px;
}

/* ==== LOGIN: Password eye ==== */
.log__pw-wrap{ position:relative; }
.log__pw-wrap .log__input{ padding-right:44px; }
.log__toggle{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:34px; height:34px; border-radius:999px;
  display:grid; place-items:center;
  border:1px solid #E50914; background:transparent; cursor:pointer;
  transition: box-shadow .2s ease, background .2s ease;
}
.log__toggle svg{ fill:#E50914; pointer-events:none; }
.log__toggle:is(:hover,.is-on){
  box-shadow:0 0 0 3px rgba(229,9,20,.25);
  background:rgba(229,9,20,.08);
}
