/* ============================================================
   Instagram login — pixel tuned
   ============================================================ */

:root{
  --bg:#fafafa;
  --surface:#ffffff;
  --border:#dbdbdb;
  --border-focus:#a8a8a8;
  --text:#262626;
  --muted:#8e8e8e;
  --blue:#0095f6;
  --blue-hover:#1877f2;
  --link:#00376b;
  --fb:#385185;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:14px;
  line-height:18px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px 16px 40px;
}

/* ---------------- card ---------------- */
.card{
  width:100%;
  max-width:350px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:1px;
  padding:40px 40px 24px;
  text-align:center;
  margin:0 0 10px;
}
.card--signup{padding:22px 40px;font-size:14px}
.card--signup a{color:var(--blue);font-weight:600;text-decoration:none}
.card--signup a:hover{text-decoration:underline}

/* ---------------- logo ---------------- */
.logo{
  margin:0 0 26px;
  font-family:"Grand Hotel","Segoe Script","Brush Script MT",cursive;
  font-size:46px;
  font-weight:400;
  line-height:1.1;
  color:var(--text);
  user-select:none;
}

/* ---------------- form ---------------- */
.field{position:relative;margin-bottom:6px}

.field__input{
  display:block;
  width:100%;
  height:38px;
  padding:13px 8px 3px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:3px;
  font-family:inherit;
  font-size:12px;
  line-height:16px;
  color:var(--text);
  outline:none;
  appearance:none;
  transition:border-color .1s ease;
}
.field__input:focus{border-color:var(--border-focus)}
.field__input:focus-visible{outline:none}

/* Chrome autofill fix */
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--text);
  -webkit-box-shadow:0 0 0 1000px var(--bg) inset;
  transition:background-color 5000s ease-in-out 0s;
}

.field__label{
  position:absolute;
  left:9px;
  top:19px;
  transform:translateY(-50%);
  max-width:calc(100% - 50px);
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:12px;
  line-height:1;
  color:var(--muted);
  pointer-events:none;
  transition:top .1s ease-out, font-size .1s ease-out;
}
.field__input:focus ~ .field__label,
.field__input:not(:placeholder-shown) ~ .field__label{
  top:9px;
  font-size:10px;
}

.field__toggle{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  padding:0;
  border:0;
  background:none;
  font-family:inherit;
  font-size:12px;
  font-weight:600;
  color:var(--text);
  cursor:pointer;
}
.field__toggle:hover{opacity:.65}

/* ---------------- button ---------------- */
.btn{
  display:block;
  width:100%;
  height:32px;
  margin-top:8px;
  border:0;
  border-radius:8px;
  background:var(--blue);
  color:#fff;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  line-height:1;
  cursor:pointer;
  transition:background .1s ease, opacity .1s ease;
}
.btn:hover{background:var(--blue-hover)}
.btn:active{opacity:.7}
.btn[disabled]{opacity:.65;cursor:default}

/* ---------------- divider ---------------- */
.divider{
  display:flex;
  align-items:center;
  margin:18px 0 16px;
  font-size:12px;
  font-weight:600;
  line-height:15px;
  color:var(--muted);
}
.divider::before,
.divider::after{content:"";flex:1;height:1px;background:var(--border)}
.divider span{padding:0 18px}

/* ---------------- facebook ---------------- */
.fb{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-bottom:16px;
  color:var(--fb);
  font-size:14px;
  font-weight:600;
  text-decoration:none;
}
.fb svg{flex:0 0 auto}

/* ---------------- forgot ---------------- */
.forgot{
  display:inline-block;
  color:var(--link);
  font-size:12px;
  line-height:15px;
  text-decoration:none;
}

/* ---------------- app store ---------------- */
.get-app{
  margin:10px 0 18px;
  font-size:14px;
  color:var(--text);
  text-align:center;
}
.badges{display:flex;gap:8px;justify-content:center}
.badges img{display:block;height:40px;width:auto}

/* ---------------- loader ---------------- */
.overlay{
  position:fixed;
  inset:0;
  z-index:99;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(250,250,250,.95);
  -webkit-backdrop-filter:blur(1px);
  backdrop-filter:blur(1px);
}
.overlay.is-on{display:flex}
.spinner{
  width:32px;
  height:32px;
  border:3px solid var(--border);
  border-top-color:var(--muted);
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------------- mobile ---------------- */
@media (max-width:450px){
  body{background:#fff;padding:0;justify-content:flex-start}
  .card{
    max-width:100%;
    border:0;
    background:#fff;
    padding:32px 24px 16px;
  }
  .card--signup{border:0;padding:16px 24px}
  .logo{font-size:40px;margin-bottom:22px}
  .badges{margin-bottom:24px}
}

@media (prefers-reduced-motion:reduce){
  .spinner{animation-duration:1.4s}
  *{transition:none!important}
}