/* RailRag sign-in — one small stylesheet for the login, password, home and admin pages. */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1f2933; --muted: #5f6b7a; --line: #dfe3e8;
  --accent: #2563eb; --accent-text: #ffffff; --danger: #b42318; --ok: #067647; --soft: #eef2f7;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --panel: #1a1f25; --text: #e6e9ed; --muted: #9aa4b2; --line: #2c333b;
    --accent: #5b8def; --accent-text: #0b1220; --danger: #f97066; --ok: #47cd89; --soft: #232a32;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a.plain { color: inherit; text-decoration: none; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px;
}
.brand { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
h1 { font-size: 20px; margin: 0 0 18px; font-weight: 600; }
h2 { font-size: 16px; margin: 24px 0 10px; font-weight: 600; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
button {
  font: inherit; border-radius: 8px; padding: 9px 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); width: 100%; margin-top: 18px; }
button:disabled { opacity: .6; cursor: default; }
button.small { padding: 4px 9px; font-size: 13px; }
.message { margin-top: 14px; font-size: 14px; min-height: 1.2em; }
.message.error { color: var(--danger); }
.message.ok { color: var(--ok); }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.hidden { display: none !important; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { border-radius: 6px; }
.seed { font-family: ui-monospace, Consolas, monospace; font-size: 13px; word-break: break-all;
        background: var(--soft); padding: 8px; border-radius: 6px; }
.codes { font-family: ui-monospace, Consolas, monospace; columns: 2; background: var(--soft);
         padding: 10px 14px; border-radius: 6px; margin: 10px 0; }

/* home and admin */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
       padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.top .who { color: var(--muted); font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { display: block; padding: 18px; background: var(--panel); border: 1px solid var(--line);
        border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent); }
.tile strong { display: block; font-size: 16px; }
.tile span { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
td select { width: auto; min-width: 7.5em; }   /* the role menu was cut to "Adm" (audit 2026-10-15) */
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.pill.admin { color: var(--accent); }
.pill.off { color: var(--danger); }
.row-form { display: grid; grid-template-columns: 1.3fr 1fr .7fr auto; gap: 8px; align-items: end;
            background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.row-form label { margin: 0 0 4px; }
.row-form button { height: 40px; }
.dialog { width: min(520px, calc(100vw - 32px)); background: var(--panel); color: var(--text);
          border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.dialog::backdrop { background: rgba(16, 24, 40, .45); }
.dialog h2 { margin: 0 0 8px; }
.dialog p { margin: 0 0 10px; font-size: 14px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.copy-row button { flex: none; background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.dialog .message { margin: 6px 0 10px; }
.dialog-actions { display: flex; justify-content: flex-end; }
@media (max-width: 640px) {
  .row-form { grid-template-columns: 1fr; }
  .top { padding: 12px 16px; }
}
