/* Opentech bridge portal. Brand tokens from the Opentech guide; dark night background for the
   login, paper background for the working screens. */
:root {
  --ot-violet: #3b36e8;
  --ot-violet-dark: #2a26b8;
  --ot-violet-light: #6c68f2;
  --ot-violet-soft: #ecebff;
  --ot-carbon: #1c1c1c;
  --ot-night: #0f0a3c;
  --ot-white: #ffffff;
  --ot-paper: #f4f5f7;
  --ot-text: #1c1c1c;
  --ot-text-muted: #5f5f6b;
  --ot-text-muted-d: #9a9aa6;
  --ot-line: #e6e7ee;
  --ot-line-d: #2f2f33;
  --ok: #1f8a5b;
  --bad: #c0392b;
  --ot-font: 'Satoshi', 'Poppins', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--ot-font); font-weight: 500; color: var(--ot-text); background: var(--ot-paper); }
h1, h2, h3 { margin: 0; letter-spacing: -0.5px; line-height: 1.1; }
button, input { font: inherit; }
.num { font-variant-numeric: tabular-nums; }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ot-violet); color: #fff; font-weight: 700;
  padding: 12px 20px; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ot-violet-dark); }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--ot-violet-light); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ot-text); border: 1px solid var(--ot-line); }
.btn.ghost:hover { border-color: var(--ot-violet); color: var(--ot-violet); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--ot-night); color: #fff; }
.login .pitch { padding: 56px max(24px, 6vw); display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 28px 28px; }
.login .pitch img { height: 34px; width: auto; align-self: flex-start; }
.login .pitch h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; max-width: 16ch; }
.login .pitch h1 em { font-style: normal; color: var(--ot-violet-light); }
.login .pitch p { color: var(--ot-text-muted-d); max-width: 46ch; line-height: 1.55; margin: 16px 0 0; }
.login .facts { display: flex; gap: 32px; flex-wrap: wrap; }
.login .facts b { display: block; font-size: 1.8rem; font-weight: 900; letter-spacing: -1px; }
.login .facts span { color: var(--ot-text-muted-d); font-size: .9rem; }
.login .panel { background: var(--ot-white); color: var(--ot-text); display: grid; place-items: center; padding: 40px 24px; }
.login form { width: 100%; max-width: 360px; display: grid; gap: 18px; }
.login form h2 { font-size: 1.7rem; font-weight: 900; }
.login form p { margin: -8px 0 4px; color: var(--ot-text-muted); }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 700; }
.field input { padding: 12px 14px; border: 1px solid var(--ot-line); border-radius: 4px; background: #fff; color: var(--ot-text); }
.err { background: #fdecea; color: var(--bad); padding: 10px 12px; border-radius: 4px; font-size: .92rem; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login .pitch { padding-block: 32px; } }

/* ---------- top bar ---------- */
.top { background: var(--ot-carbon); color: #fff; display: flex; align-items: center; gap: 16px; padding: 12px max(16px, 3vw); }
.top img { height: 24px; width: auto; }
.top .who { margin-left: auto; color: var(--ot-text-muted-d); font-size: .9rem; display: flex; gap: 12px; align-items: center; }
.top .who button { background: none; border: 1px solid var(--ot-line-d); color: #fff; padding: 6px 12px; border-radius: 4px; cursor: pointer; }

/* ---------- environment list ---------- */
.wrap { max-width: 980px; margin: 0 auto; padding: 40px max(16px, 3vw); display: grid; gap: 28px; }
.wrap > header p { color: var(--ot-text-muted); margin: 10px 0 0; max-width: 62ch; line-height: 1.55; }
.envs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.env { background: #fff; border: 1px solid var(--ot-line); border-radius: 6px; padding: 20px; display: grid; gap: 10px; }
.env .client { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ot-violet); }
.env h3 { font-size: 1.3rem; font-weight: 900; }
.env code { font-size: .82rem; color: var(--ot-text-muted); word-break: break-all; }
.env .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- session (versus) ---------- */
.versus { display: grid; grid-template-rows: auto auto 1fr; height: 100%; }
.bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--ot-line); border-bottom: 1px solid var(--ot-line); }
.bar > div { background: #fff; padding: 12px 16px; display: grid; gap: 2px; }
.bar small { color: var(--ot-text-muted); font-size: .78rem; }
.bar b { font-size: 1.45rem; font-weight: 900; letter-spacing: -.5px; }
.bar .direct b { color: var(--bad); }
.bar .bridge b { color: var(--ok); }
.bar .saving { background: var(--ot-violet-soft); }
.bar .saving b { color: var(--ot-violet); }
.status { padding: 8px max(16px, 3vw); font-size: .9rem; color: var(--ot-text-muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ot-violet-light); }
.status.listo .dot { background: var(--ok); }
.status.error .dot { background: var(--bad); }
.status .spacer { flex: 1; }
.screen { position: relative; background: var(--ot-carbon); min-height: 0; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen .wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ot-text-muted-d); text-align: center; padding: 24px; }
