:root {
  --ink: #0d1422;
  --text: #1f2a3d;
  --muted: #5b6679;
  --line: #e3e8f0;
  --field: #c9d2e0;
  --ground: #f4f6fa;
  --header: #0d1422;
  --header-line: rgba(255, 255, 255, 0.14);
  --header-text: #d8dfed;
  --header-muted: #9aa6ba;
  --accent: #1f68cf;
  --accent-hover: #1857ad;
  --danger-ink: #a33422;
  --danger-soft: #fdecea;
  --danger-line: #e3b3aa;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}

[hidden] { display: none !important; }

.bar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--header);
}
.bar-logo { height: 22px; }
.bar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--header-muted);
}
.bar-spacer { flex: 1; }
.bar-tools { display: flex; align-items: center; gap: 8px; }
.bar-id { margin-right: 6px; font-size: 14px; font-weight: 600; color: var(--header-text); font-variant-numeric: tabular-nums; }
.bar-btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--header-line);
  border-radius: 8px;
  background: transparent;
  color: var(--header-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bar-btn:hover { background: rgba(255, 255, 255, 0.06); }
.bar-btn-danger { border-color: rgba(230, 116, 97, 0.5); color: #f6c3b9; }

.page {
  min-height: calc(100% - 56px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px;
}

.card {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; font-weight: 600; }
.muted { margin: 0; color: var(--muted); font-size: 14px; }

.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.label { font-size: 13px; font-weight: 700; }
.input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input-id { font-size: 24px; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

.btn {
  height: 48px;
  margin-top: 8px;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { border: 0; background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { width: 100%; border: 1px solid #d5dce8; background: #fff; color: var(--text); }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text);
}
.spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid #c9d8f2;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger-ink);
  font-size: 14px;
}

.session {
  position: fixed;
  inset: 56px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070a12;
  overflow: hidden;
}
#screen {
  max-width: 100%;
  max-height: 100%;
  cursor: default;
  outline: none;
}
