/* The portal wears the dashboard's theme. The tokens are copied rather than
   imported: the portal runs on the VPS as its own container and cannot reach
   the dashboard's stylesheet, and a copied palette failing to update is a
   cosmetic drift, not an outage. */
:root {
  color-scheme: dark;
  --bg: #0a0b10;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e8eaf2;
  --muted: #8b91a7;
  --faint: #565c72;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --accent: #a3e635;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  min-height: 100vh;
}

a { color: var(--accent); }

/* ---- landing ------------------------------------------------------------ */

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate form {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 22px;
  display: grid;
  gap: 12px;
}

.gate h1 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.gate .hint { margin: 0; color: var(--faint); font-size: 12px; }

.gate input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
}

.gate input:focus { outline: none; border-color: rgba(163, 230, 53, 0.45); }

.gate button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(163, 230, 53, 0.35);
  background: rgba(163, 230, 53, 0.12);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.gate button[disabled] { opacity: 0.5; cursor: progress; }

.err {
  min-height: 16px;
  color: var(--red);
  font-size: 12px;
}

/* ---- shell ------------------------------------------------------------- */

header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
}

.who { font-weight: 600; margin-right: 4px; }

.rashid {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.rashid img { height: 32px; width: auto; image-rendering: pixelated; }
.rashid .rk { display: block; color: var(--faint); font-size: 10px;
              text-transform: uppercase; letter-spacing: 0.6px; }
.rashid .rv { display: block; font-size: 13px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.chip:hover { border-color: rgba(163, 230, 53, 0.35); }
.chip[aria-selected="true"] { border-color: rgba(163, 230, 53, 0.55);
                              background: rgba(163, 230, 53, 0.10); }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.offline { opacity: 0.45; cursor: not-allowed; }
.chip.offline .n { color: var(--red); }

.spacer { flex: 1 1 auto; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }

main { padding: 0; }

/* The component fills the rest of the viewport. A page-kind component brings
   its own layout, so the shell gives it the space and stays out of the way. */
#stage {
  width: 100%;
  height: calc(100vh - 57px);
  border: 0;
  display: block;
  background: var(--bg);
}

.empty { padding: 28px; color: var(--muted); }
