:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9eef8;
  background: #080b11;
  font-synthesis: none;
  --panel: rgba(17, 23, 34, .88);
  --panel-border: rgba(137, 157, 190, .16);
  --muted: #8f9bb1;
  --accent: #9be15d;
  --accent-2: #54d6c1;
  --danger: #ff829d;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 18% -10%, #182736 0, transparent 42%), #080b11; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1480px, calc(100% - 36px)); margin: 0 auto; padding: 26px 0 18px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .23em; font-weight: 800; margin: 0 0 7px; }
h1 { font-size: clamp(22px, 3vw, 34px); line-height: 1.05; margin: 0; letter-spacing: -.04em; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; color: var(--muted); background: rgba(16, 24, 36, .7); border: 1px solid var(--panel-border); border-radius: 999px; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #657085; box-shadow: 0 0 0 4px rgba(101, 112, 133, .14); }
.status-pill[data-state="connecting"] .status-dot { background: #f7bf5f; box-shadow: 0 0 0 4px rgba(247, 191, 95, .14); }
.status-pill[data-state="connected"] .status-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(155, 225, 93, .14); }
.status-pill[data-state="error"] .status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 130, 157, .14); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; min-height: min(760px, calc(100vh - 150px)); }
.stage { position: relative; min-height: 540px; overflow: hidden; background: #030507; border: 1px solid var(--panel-border); border-radius: 18px; box-shadow: 0 28px 80px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.02); outline: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage:focus-visible { border-color: rgba(155,225,93,.7); box-shadow: 0 0 0 3px rgba(155,225,93,.18); }
#remote-video { display: block; width: 100%; height: 100%; min-height: 540px; object-fit: contain; background: #030507; }
.stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--muted); pointer-events: none; }
.stage-empty strong { color: #dce4f2; font-size: 16px; }
.stage-empty span { font-size: 12px; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 9px; border: 1px solid rgba(155,225,93,.35); border-radius: 16px; color: var(--accent); font-size: 28px; }
.stage-hud { position: absolute; left: 13px; right: 13px; bottom: 12px; display: flex; justify-content: space-between; color: rgba(229,236,247,.58); font-size: 11px; pointer-events: none; }
.remote-cursor { position: absolute; width: 24px; height: 32px; transform: translate(-2px, -2px); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.remote-cursor svg { width: 100%; height: 100%; fill: white; stroke: #121722; stroke-width: 1.8; stroke-linejoin: round; }
.side-panel { display: flex; flex-direction: column; gap: 12px; }
.card { padding: 16px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 15px; box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.card-title { display: flex; align-items: center; justify-content: space-between; color: #dce5f4; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.secure-mark { color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .03em; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 12px; }
input { width: 100%; padding: 10px 11px; color: #e9eef8; background: rgba(5, 9, 16, .75); border: 1px solid rgba(132,153,186,.19); border-radius: 9px; outline: none; }
input:focus { border-color: rgba(155,225,93,.7); box-shadow: 0 0 0 3px rgba(155,225,93,.1); }
button { border: 0; border-radius: 9px; padding: 10px 12px; color: #0b1009; font-weight: 750; font-size: 12px; transition: transform .16s ease, filter .16s ease, opacity .16s ease; }
button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .48; }
.primary { width: 100%; margin-top: 15px; background: linear-gradient(135deg, var(--accent), #c2ed78); }
.secondary { width: 100%; margin-top: 8px; color: #dae1ec; background: rgba(136,151,177,.12); border: 1px solid rgba(136,151,177,.18); }
.fine-print { margin: 13px 0 0; color: #748197; font-size: 10px; line-height: 1.45; }
.gesture-hint { margin: 8px 0 0; color: #8c9bb2; font-size: 10px; line-height: 1.45; }
.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool-button { color: #dce5f4; background: rgba(136,151,177,.11); border: 1px solid rgba(136,151,177,.16); font-weight: 650; }
.tool-button.danger { color: var(--danger); }
.telemetry-card { margin-top: auto; }
.telemetry-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.telemetry-card dl div { padding: 9px; background: rgba(5,9,16,.42); border-radius: 9px; }
.telemetry-card dt { color: #748197; font-size: 10px; }
.telemetry-card dd { margin: 4px 0 0; color: #e7eefb; font-size: 15px; font-variant-numeric: tabular-nums; }
.footer { display: flex; justify-content: space-between; gap: 15px; padding: 13px 2px 0; color: #667287; font-size: 11px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 10; }
.toast { max-width: 350px; padding: 11px 13px; color: #e7eefb; background: #151d2b; border: 1px solid var(--panel-border); border-radius: 10px; box-shadow: 0 12px 35px rgba(0,0,0,.3); font-size: 12px; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 960px) { .workspace { grid-template-columns: 1fr; } .side-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .telemetry-card { margin-top: 0; } }
@media (max-width: 600px) { .shell { width: min(100% - 20px, 1480px); padding-top: 16px; } .topbar { align-items: flex-start; flex-direction: column; } .workspace { min-height: auto; } .stage, #remote-video { min-height: 55vh; } .side-panel { display: flex; } .footer { flex-direction: column; gap: 5px; } }
