:root {
  --bg-deep: #090e1a;
  --bg-panel: #0f172a;
  --bg-card: #16213a;
  --border-blue: #0284c7;
  --accent-sky: #38bdf8;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --green-ok: #22c55e;
  --amber-warn: #f59e0b;
  --red-danger: #dc2626;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: var(--bg-deep); color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; user-select: none;
}
#root {
  display: flex; flex-direction: column; width: 100%; height: 100%;
}
.ei-header {
  background: var(--bg-panel); border-bottom: 1px solid #1e293b;
  padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.ei-brand {
  font-weight: 700; color: var(--accent-sky); font-size: 14px; margin-right: 6px;
}
.ei-input {
  background: #1e293b; color: #fff; border: 1px solid #334155;
  border-radius: 5px; padding: 5px 8px; font-size: 13px;
}
.ei-btn {
  background: var(--border-blue); color: #fff; border: none;
  border-radius: 5px; padding: 6px 10px; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.ei-btn:active { opacity: 0.85; }
.ei-btn.danger { background: var(--red-danger); }
.ei-btn.secondary { background: #334155; }
.ei-btn.active-mode { background: var(--green-ok); color: #052e16; }
.ei-fleet-bar {
  background: #111c33; border-bottom: 1px solid #1e293b;
  padding: 5px 10px; display: flex; gap: 8px; overflow-x: auto; align-items: center;
  font-size: 12px;
}
.ei-device-pill {
  background: var(--bg-card); border: 1px solid var(--border-blue);
  border-radius: 6px; padding: 4px 9px; display: flex; align-items: center; gap: 6px;
  cursor: pointer; white-space: nowrap;
}
.ei-viewport {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  background: #050811; overflow: hidden; touch-action: none;
}
#ei-screen-canvas {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transform-origin: center center;
}
.ei-toolbar {
  background: var(--bg-panel); border-top: 1px solid #1e293b;
  padding: 6px 8px; display: flex; gap: 6px; overflow-x: auto; align-items: center;
}
.ei-status-footer {
  background: #090d18; border-top: 1px solid #1e293b;
  padding: 3px 10px; font-size: 11.5px; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}
.ei-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.ei-modal {
  background: var(--bg-panel); border: 1px solid var(--border-blue);
  border-radius: 8px; padding: 16px; width: min(420px, 92vw);
}
.ei-pty-drawer {
  position: absolute; bottom: 0; left: 0; right: 0; height: 42%;
  background: rgba(9, 14, 26, 0.96); border-top: 2px solid var(--border-blue);
  display: flex; flex-direction: column; padding: 8px; z-index: 30;
}
.ei-pty-output {
  flex: 1; background: #050811; color: #38bdf8; font-family: monospace;
  font-size: 12px; padding: 8px; overflow-y: auto; white-space: pre-wrap;
  border: 1px solid #1e293b; border-radius: 4px; margin-bottom: 6px;
}
#ei-ime-sentinel {
  position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0;
}
