/* magbox — sign in.
 * Deliberately standalone: app.css owns .card for the channel grid, and
 * sharing it once laid this form out sideways as a flex row. Nothing here
 * depends on app.css.
 */

:root{
  --bg:#0e1116;
  --bg2:#151a21;
  --bg3:#1c232c;
  --line:#242c37;
  --fg:#e6ebf2;
  --muted:#8894a5;
  --accent:#3b82f6;
  --bad:#ef4444;
  --warn:#eab308;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  color:var(--fg);
  background:
    radial-gradient(1100px 620px at 50% -12%, #1b2740 0%, rgba(27,39,64,0) 62%),
    var(--bg);
  font:15px/1.5 "Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  display:grid;
  place-items:center;
  padding:24px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
  overflow-y:auto;
}

.loginbox{
  width:100%;
  max-width:380px;
  background:var(--bg2);
  border:1px solid var(--line);
  border-radius:16px;
  padding:32px 28px 28px;
  box-shadow:0 24px 60px rgba(0,0,0,.45);
}

.mark{
  display:flex;
  align-items:center;
  gap:11px;
  font-size:21px;
  font-weight:600;
  letter-spacing:.3px;
  margin:0 0 6px;
}
.mark .dot{
  width:13px;height:13px;border-radius:50%;flex:0 0 auto;
  background:var(--accent);
  box-shadow:0 0 14px rgba(59,130,246,.85);
}
.tagline{margin:0 0 26px;color:var(--muted);font-size:13.5px}

.field{margin:0 0 18px}
.field label{
  display:block;font-size:12px;letter-spacing:.4px;text-transform:uppercase;
  color:var(--muted);margin:0 0 7px;
}
.field input{
  display:block;width:100%;height:46px;padding:0 14px;
  background:var(--bg3);border:1px solid var(--line);border-radius:10px;
  color:var(--fg);font-size:15px;font-family:inherit;outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder{color:#5d6878}
.field input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(59,130,246,.18);
}

.submit{
  display:block;width:100%;height:48px;margin-top:4px;
  background:var(--accent);border:1px solid var(--accent);border-radius:10px;
  color:#fff;font:600 15px/1 inherit;font-family:inherit;cursor:pointer;
  transition:filter .15s ease;
}
.submit:hover:not(:disabled){filter:brightness(1.09)}
.submit:disabled{opacity:.6;cursor:default}

.msg{margin-top:16px;font-size:13.5px;min-height:20px;text-align:center}
.msg.bad{color:#ffb4b4}
.msg.working{color:var(--muted)}

.notice{
  margin-top:22px;padding:13px 15px;border-radius:10px;font-size:12.5px;line-height:1.6;
  background:rgba(234,179,8,.12);border:1px solid rgba(234,179,8,.38);color:#f4dd8a;
}
.notice b{color:#ffe9a3}
.notice.err{
  background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.4);color:#ffb4b4;
  font-family:Consolas,monospace;
}

@media (max-width:420px){
  .loginbox{padding:26px 20px 22px;border-radius:14px}
  .mark{font-size:19px}
  .tagline{margin-bottom:22px}
}

/* a short landscape phone should still show the whole card */
@media (max-height:520px){
  body{align-items:start}
  .loginbox{padding:22px 22px 20px}
  .tagline{margin-bottom:16px}
  .field{margin-bottom:13px}
}
