/* Shared styling for the admin console. Viewer pages style themselves inline. */

* { box-sizing: border-box; }

body.admin {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #14161a;
  color: #e8e8e8;
  margin: 0;
  padding: 32px 16px;
}

.card {
  background: #1f2229;
  border: 1px solid #2c313b;
  padding: 22px;
  border-radius: 10px;
  max-width: 560px;
  margin: 0 auto 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

h2, h3, h4 { margin: 0 0 14px; font-weight: 600; }
h4 { margin-top: 18px; color: #9aa4b2; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
label { display: block; margin: 14px 0 6px; font-size: 13px; color: #9aa4b2; }

input, select, button {
  width: 100%;
  padding: 11px 12px;
  border-radius: 6px;
  border: 1px solid #3a4150;
  background: #2a2f3a;
  color: #fff;
  font-size: 14px;
}

button {
  background: #2f6fed;
  border: none;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: background .15s;
}
button:hover { background: #1d5bd6; }
button:disabled { background: #3a4150; cursor: not-allowed; }
button.stop { background: #d6453a; }
button.stop:hover { background: #b8362d; }
button.ghost { background: #2a2f3a; border: 1px solid #3a4150; }
button.ghost:hover { background: #333a47; }

.langs { background: #2a2f3a; border: 1px solid #3a4150; border-radius: 6px; padding: 10px 12px; }
.langs label { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: #e8e8e8; cursor: pointer; }
.langs input { width: auto; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 20px;
  background: #2a2f3a;
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #6b7280; }
.status.connected .dot { background: #34c759; }
.status.connecting .dot, .status.reconnecting .dot { background: #ffb020; animation: pulse 1s infinite; }
.status.error .dot { background: #d6453a; }
.status.idle .dot, .status.stopped .dot { background: #6b7280; }
@keyframes pulse { 50% { opacity: .3; } }

.terminal {
  background: #0c0e12; border: 1px solid #2c313b; border-radius: 6px;
  height: 240px; overflow-y: auto; padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  line-height: 1.6; color: #cbd5e1;
}
.terminal .seg { margin-bottom: 8px; }
.terminal .src { color: #7dd3fc; }
.terminal .tr { color: #94a3b8; padding-left: 14px; }
.muted { color: #6b7280; font-size: 12px; }
.err { color: #ff8a80; }
