* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }
html, body { width: 100%; height: 100%; background: #0b1120; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; overflow: hidden; touch-action: none; }

.hidden { display: none !important; }

.overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top, #1e293b, #0b1120); padding: 16px;
}
.card {
  width: 100%; max-width: 360px; background: #111827; border: 1px solid #334155;
  border-radius: 14px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.card h1 { font-size: 22px; margin-bottom: 6px; color: #38bdf8; }
.muted { font-size: 13px; color: #94a3b8; margin-bottom: 16px; }
.card input[type="password"] {
  width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #475569;
  background: #0f172a; color: #fff; font-size: 16px; margin-bottom: 12px;
}
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cbd5e1; margin-bottom: 16px; }
.btn-primary {
  width: 100%; padding: 12px; border: none; border-radius: 8px;
  background: #0284c7; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: #0369a1; }
.error { color: #f87171; font-size: 13px; margin-top: 10px; min-height: 18px; }

.remote-view { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
#screen { max-width: 100vw; max-height: 100vh; width: auto; height: auto; display: block; cursor: default; touch-action: none; }

.mobile-kb { position: fixed; top: -100px; left: -100px; opacity: 0; width: 1px; height: 1px; }

.fab {
  position: fixed; top: 10px; right: 10px; z-index: 30;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.85); color: #fff; font-size: 18px; cursor: pointer;
}
.toolbar {
  position: fixed; top: 58px; right: 10px; z-index: 29;
  background: rgba(15, 23, 42, 0.94); border: 1px solid #334155;
  border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
  max-width: calc(100vw - 20px); backdrop-filter: blur(8px);
}
.toolbar .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.toolbar select, .toolbar button {
  padding: 6px 10px; border-radius: 6px; border: 1px solid #475569;
  background: #1e293b; color: #f1f5f9; font-size: 12px; cursor: pointer;
}
.toolbar button.active { background: #0284c7; border-color: #38bdf8; }
.toolbar button.danger { background: #991b1b; border-color: #ef4444; }
.badge { font-size: 12px; color: #4ade80; font-weight: 600; padding: 0 4px; }
