:root {
  --bg: #07090f;
  --panel: #111522;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef1f8;
  --muted: #9aa3b8;
  --accent: #5280ff;
  --ok: #4dd98c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
[hidden] { display: none !important; }
button, select { font: inherit; color: inherit; }

.page { max-width: 560px; margin: 0 auto; padding: 56px 24px; display: flex; flex-direction: column; gap: 20px; min-height: 100%; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: radial-gradient(circle at 35% 30%, #8fb0ff, var(--accent) 55%, #2440b8); box-shadow: 0 6px 24px rgba(82, 128, 255, 0.35); }
.lead { color: var(--muted); margin: 0; line-height: 1.5; }
.foot { margin-top: auto; color: var(--muted); font-size: 13px; }
.status { color: var(--muted); min-height: 1.4em; margin: 0; }

.macs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mac { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.mac-icon { width: 36px; height: 26px; border: 2px solid var(--muted); border-radius: 5px; position: relative; flex: none; }
.mac-icon::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 3px; margin-left: -8px; background: var(--muted); border-radius: 2px; }
.mac-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mac-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mac-text span { color: var(--muted); font-size: 13px; }

button { cursor: pointer; border: 0; border-radius: 10px; padding: 9px 16px; background: rgba(255, 255, 255, 0.08); }
button:hover { background: rgba(255, 255, 255, 0.14); }
button.primary { background: var(--accent); color: white; font-weight: 600; }
button.primary:hover { filter: brightness(1.1); }
button.ghost { background: transparent; color: var(--muted); }
button.link { background: none; color: var(--accent); padding: 4px 0; align-self: flex-start; }

.login { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.qr { width: 240px; height: 240px; padding: 10px; background: white; border-radius: 18px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; flex: 1; min-width: 220px; }

.session { position: fixed; inset: 0; display: flex; flex-direction: column; background: black; }
.bar { height: 44px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-bottom: 1px solid var(--line); background: #0b0d14; }
.bar .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .controls { margin: 0 auto; display: flex; gap: 6px; align-items: center; }
.bar button, .bar select { padding: 5px 10px; border-radius: 8px; font-size: 13px; background: rgba(255, 255, 255, 0.07); border: 0; }
.bar button.icon { width: 34px; padding: 5px 0; }
.stage { position: relative; flex: 1; min-height: 0; }
#screen { width: 100%; height: 100%; object-fit: contain; display: block; outline: none; background: black; image-rendering: auto; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); }
.card { max-width: 420px; padding: 28px; border-radius: 22px; background: rgba(20, 24, 36, 0.92); border: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.card p { margin: 0; line-height: 1.5; }
.actions { display: flex; gap: 10px; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: white; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: rgba(20, 24, 36, 0.92); border: 1px solid var(--line); font-size: 13px; max-width: 80%; }
:fullscreen .bar { opacity: 0.85; }
