:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #10161d;
  color: #eaf0f4;
  --panel: #19232d;
  --muted: #a9b6c3;
  --line: #364654;
  --accent: #a9dfc6;
  --warn: #f2b887;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; }
button, input { font: inherit; }
button { border: 1px solid transparent; border-radius: 7px; padding: .65rem .9rem; background: var(--accent); color: #132921; font-weight: 650; cursor: pointer; }
button.secondary { border-color: var(--line); background: transparent; color: inherit; }
button:disabled { opacity: .48; cursor: default; }
button:not(:disabled):hover { filter: brightness(1.12); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--accent); font-size: .9rem; font-weight: 700; letter-spacing: .035em; }
.brand-dot, .status-dot { width: .65rem; height: .65rem; flex: 0 0 .65rem; border-radius: 50%; background: var(--accent); }
.login-page { display: grid; align-content: center; justify-items: center; padding: 1rem; }
.login-card { width: min(100%, 416px); padding: clamp(1.4rem, 6vw, 2.4rem); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; background: var(--panel); }
.login-card h1 { margin: .8rem 0 .35rem; font-size: 2.15rem; font-weight: 630; letter-spacing: -.035em; }
.muted { color: var(--muted); line-height: 1.5; margin: 0 0 2rem; }
form { display: grid; gap: .7rem; }
input { min-width: 0; padding: .75rem .85rem; color: inherit; background: #111922; border: 1px solid var(--line); border-radius: 7px; }
.form-status { min-height: 1.35rem; color: var(--warn); margin: 0; font-size: .9rem; }
.desktop-page { height: 100svh; min-height: 0; display: flex; flex-direction: column; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.4rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.header-brand { padding-right: 1rem; border-right: 1px solid var(--line); }
.header-brand h1 { margin: .1rem 0 0; font-size: 1.02rem; font-weight: 620; }
#stream-status { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .9rem; margin: 0; }
#stream-status[data-state="control"] { color: var(--warn); }
#stream-status[data-state="control"] .status-dot, #stream-status[data-state="offline"] .status-dot { background: var(--warn); }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-left: auto; }
.desktop-wrap { position: relative; flex: 1; min-height: 0; background: #090e14; }
#screen { position: absolute; inset: 0; overflow: hidden; }
.offline { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .4rem; padding: 1rem; text-align: center; }
.offline p { max-width: 22rem; color: var(--muted); }
@media (max-width: 640px) {
  header { gap: .6rem; padding: .6rem; }
  .actions { margin: 0; width: 100%; }
  button { padding: .5rem .7rem; font-size: .87rem; }
}
