/* Standalone styling for the auth pages (login / pair / approve / devices).
   Deliberately self-contained — these pages do NOT load the editor SPA.
   The per-instance accent comes in via the inline --accent on <body>. */

:root {
  --accent: #228be6;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #e03131;
}

* { box-sizing: border-box; }

body.auth {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}
.card.wide { max-width: 560px; }

h1 { margin: 0 0 4px; font-size: 1.35rem; }
.sub { margin: 0 0 18px; color: var(--muted); }
.hint { color: var(--muted); font-size: 0.86rem; }
.foot { margin-top: 18px; font-size: 0.88rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #f1f3f5; padding: 1px 5px; border-radius: 5px; font-size: 0.85em; }

.stack { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
label { font-size: 0.82rem; color: var(--muted); }
input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 1rem;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

button {
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(0.95); }
button.secondary { background: #495057; }
button.danger { background: var(--danger); padding: 6px 12px; font-size: 0.85rem; }
button.linkbtn { background: none; color: var(--accent); padding: 0; font-weight: 600; }

.msg { padding: 9px 12px; border-radius: 9px; font-size: 0.9rem; margin: 0 0 14px; }
.msg.error { background: #fff0f0; color: #c92a2a; border: 1px solid #ffc9c9; }
.msg.notice { background: #ebfbee; color: #2b8a3e; border: 1px solid #b2f2bb; }

details.alt { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
details.alt summary { cursor: pointer; color: var(--accent); font-weight: 600; }

.qr { display: flex; justify-content: center; margin: 14px 0; }
.qr svg { width: 220px; height: 220px; }
.code { word-break: break-all; font-size: 0.78rem; color: var(--muted); text-align: center; }
.status { text-align: center; font-weight: 600; margin-top: 10px; }

ul.devices { list-style: none; padding: 0; margin: 8px 0; }
ul.devices li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.dinfo { display: flex; flex-direction: column; gap: 2px; }
.dinfo small { color: var(--muted); font-size: 0.78rem; }
.badge {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.68rem; vertical-align: middle;
}
form.inline { display: inline; }
