/* ==========================================================================
   The sign-in page at emsdashboard.live.

   Black, because the logo is a brushed-metal mark on black and anything else
   puts a grey box around it. The form is the only thing on the page with any
   colour in it, so there is nowhere else to look.
   ========================================================================== */
:root{
  --steel:#d7d9dc;
  --steel-soft:#9aa0a6;
  --line:#2a2c30;
  --card:#111214;
  --red:#e11d2a;
  --bad:#ff6b6b;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; padding:0; }
body{
  background:#000;
  color:var(--steel);
  font-family:var(--font);
  min-height:100dvh;
  display:flex; align-items:center; justify-content:center;
  padding:26px 20px calc(26px + env(safe-area-inset-bottom));
}

.shell{ width:100%; max-width:430px; text-align:center; }

/* The logo file is black-on-black itself, so it simply sits on the page —
   no panel, no border, nothing to give away that it is a rectangle. */
.logo{
  display:block; width:100%; max-width:390px; height:auto; margin:0 auto 26px;
  user-select:none; -webkit-user-drag:none;
}

.box{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:26px 24px 20px;
  text-align:left;
}
.box h1{ margin:0 0 3px; font-size:20px; font-weight:800; color:#fff; letter-spacing:-.2px; }
.sub{ margin:0 0 18px; font-size:13px; color:var(--steel-soft); }

.f{ display:block; margin-bottom:14px; }
.f>span{
  display:block; font-size:11.5px; font-weight:700; letter-spacing:.5px;
  text-transform:uppercase; color:var(--steel-soft); margin-bottom:6px;
}
.f input{
  width:100%; padding:12px 13px; font:inherit; font-size:16px;  /* 16px: iOS zooms anything smaller */
  color:#fff; background:#000; border:1px solid var(--line); border-radius:9px; outline:none;
}
.f input:focus{ border-color:var(--steel-soft); box-shadow:0 0 0 3px rgba(215,217,220,.12); }
.f input:-webkit-autofill{ -webkit-text-fill-color:#fff; -webkit-box-shadow:0 0 0 40px #000 inset; }

.btn{
  width:100%; margin-top:4px; padding:13px 16px;
  font:inherit; font-size:15.5px; font-weight:700; color:#fff;
  background:var(--red); border:0; border-radius:9px; cursor:pointer;
}
.btn:hover{ background:#c4121f; }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.msg{
  font-size:13.5px; font-weight:600; line-height:1.4;
  border-radius:9px; padding:10px 12px; margin-bottom:14px;
  border:1px solid var(--line); background:#000;
}
.msg.bad{ color:var(--bad); border-color:#4a2225; background:rgba(225,29,42,.09); }

.foot{ margin:16px 0 0; text-align:center; font-size:13px; }
.foot a{ color:var(--steel-soft); text-decoration:none; border-bottom:1px solid var(--line); }
.foot a:hover{ color:#fff; }

.tiny{
  margin:22px 0 0; font-size:11px; letter-spacing:.4px;
  text-transform:uppercase; color:#4a4d52;
}

/* While the page is still working out whether there is already a session,
   there is no point flashing the form up. */
.box,.tiny{ opacity:0; transition:opacity .18s; }
body.askable .box, body.askable .tiny{ opacity:1; }

@media (max-width:420px){
  .logo{ margin-bottom:18px; }
  .box{ padding:22px 18px 18px; }
}

/* ------------------------------------------- password | use my phone */
.tabs{ display:flex; gap:6px; margin:0 0 16px; background:#000;
  border:1px solid var(--line); border-radius:10px; padding:4px; }
.tab{
  flex:1; padding:9px 10px; font:inherit; font-size:13.5px; font-weight:700;
  color:var(--steel-soft); background:transparent; border:0; border-radius:7px; cursor:pointer;
}
.tab.on{ background:#1b1d20; color:#fff; }

.qrbox{
  width:230px; height:230px; margin:4px auto 14px; padding:10px;
  background:#fff; border-radius:12px; display:flex; align-items:center; justify-content:center;
}
.qrbox svg{ width:100%; height:100%; display:block; }
.qrspin{
  width:26px; height:26px; border-radius:50%;
  border:3px solid #ddd; border-top-color:var(--red); animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.qrstate{ margin:0; text-align:center; font-size:13px; color:var(--steel-soft); min-height:18px; }
.qrstate.bad{ color:var(--bad); font-weight:600; }
