/* The standalone shell: sign-in, setup, account pages and the thin bar above the workspace. */
:root {
  --bg: #e9edf2; --panel: #ffffff; --text: #1d2733; --muted: #5b6878; --line: #c4ccd6;
  --accent: #23628f; --accent-text: #ffffff; --alert-bg: #fdecea; --alert-text: #8a1c12;
  --ok-bg: #e6f4ea; --ok-text: #1e5b30; --info-bg: #e8f0fb; --info-text: #1f4a7a; --bar: #1f3b57; --bar-text: #f2f6fa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151a21; --panel: #1e252e; --text: #e3e8ee; --muted: #9aa6b4; --line: #364250;
    --accent: #4f9bd1; --accent-text: #0d1117; --alert-bg: #3b1a17; --alert-text: #f3b7ae;
    --ok-bg: #173323; --ok-text: #a6e3b8; --info-bg: #182a40; --info-text: #a9c9ee; --bar: #0f1822; --bar-text: #e3e8ee;
  }
}
:root[data-theme="dark"] {
  --bg: #151a21; --panel: #1e252e; --text: #e3e8ee; --muted: #9aa6b4; --line: #364250;
  --accent: #4f9bd1; --accent-text: #0d1117; --alert-bg: #3b1a17; --alert-text: #f3b7ae;
  --ok-bg: #173323; --ok-text: #a6e3b8; --info-bg: #182a40; --info-text: #a9c9ee; --bar: #0f1822; --bar-text: #e3e8ee;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.4rem; margin: 0 0 .6rem; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
code { font-family: ui-monospace, Consolas, monospace; }

.standalone { display: flex; min-height: 100vh; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; }
.standalone-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 24px; width: 100%; max-width: 380px; }
.standalone-card.wide { max-width: 520px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.stack label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.card h3 { margin: 18px 0 4px; font-size: 1rem; }
.narrow { max-width: 360px; }
input, select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--text); }
.button { display: inline-block; font: inherit; padding: 7px 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.button.ghost { background: transparent; }
.linklike { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.inline-form { display: inline; }
.alert { background: var(--alert-bg); color: var(--alert-text); padding: 8px 10px; border-radius: 4px; }
.flash { padding: 8px 10px; border-radius: 4px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-text); }
.flash-info { background: var(--info-bg); color: var(--info-text); }
.flash-error { background: var(--alert-bg); color: var(--alert-text); }
.badge { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: .8rem; font-weight: 600; }
.badge.on { background: var(--ok-bg); color: var(--ok-text); }
.badge.off { background: var(--alert-bg); color: var(--alert-text); }
.qr svg { width: 180px; height: 180px; background: #fff; }
.rc-list { columns: 2; font-size: 1.05rem; }
details { margin: 8px 0; }

.shell-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 30px; padding: 0 12px; background: var(--bar); color: var(--bar-text); font-size: 12px; }
.shell-bar a { color: var(--bar-text); text-decoration: none; }
.shell-name { font-weight: 700; letter-spacing: .02em; }
.shell-user { display: flex; gap: 14px; align-items: center; }
.shell-content { max-width: 900px; margin: 0 auto; padding: 16px; }
.shell-content .card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 0 0 16px; }
.shell-content-workspace { height: calc(100vh - 30px); overflow: hidden; }
