/* SPDX-License-Identifier: AGPL-3.0-only */
/* Portal layout glue on top of the design system's tokens (NewVision.Experience.Ui/tokens.css). */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--plat-color-ground);
  color: var(--plat-color-ink);
  font-family: var(--plat-font-sans);
  font-size: var(--plat-font-size-md);
  line-height: 1.45;
}
.portal-page a { color: var(--plat-color-accent); text-decoration: none; }
.portal-page a:hover { text-decoration: underline; }
.plat-shell__top-end a { color: var(--plat-color-on-topbar); font-size: var(--plat-font-size-sm); }
.portal-nav { display: flex; flex-direction: column; gap: 2px; padding: var(--plat-space-2); }
.portal-nav a {
  display: flex;
  align-items: center;
  height: var(--plat-control-height);
  padding: 0 var(--plat-space-3);
  border-radius: var(--plat-radius-control);
  color: var(--plat-color-ink);
  font-size: var(--plat-font-size-md);
  text-decoration: none;
}
.portal-nav a:hover { background: var(--plat-color-accent-tint); text-decoration: none; }
.portal-nav a.active { background: var(--plat-color-accent-tint); color: var(--plat-color-accent); font-weight: 600; }
.portal-page > h1 {
  margin: 0;
  padding: var(--plat-space-3) var(--plat-space-4);
  font-size: var(--plat-font-size-xl);
  font-weight: 700;
  background: var(--plat-color-surface);
  border-bottom: var(--plat-line-width) solid var(--plat-color-line);
}
.portal-page > .plat-crumbs { padding: var(--plat-space-2) var(--plat-space-4) 0; background: var(--plat-color-surface); }
.portal-page > form.portal-form { padding: var(--plat-space-4); }
.plat-section {
  margin: var(--plat-space-4);
  border: var(--plat-line-width) solid var(--plat-color-line);
  border-radius: var(--plat-radius-control);
  overflow: hidden;
}
.plat-section__body { display: grid; gap: var(--plat-space-3); padding: var(--plat-space-4); }
.plat-section__body > p { margin: 0; color: var(--plat-color-ink-secondary); }
.portal-form { display: grid; gap: var(--plat-space-3, 12px); max-width: 36rem; }
.portal-inline { display: flex; flex-wrap: wrap; align-items: end; gap: var(--plat-space-3, 12px); max-width: none; }
.portal-actions { display: flex; gap: var(--plat-space-2, 8px); }
.portal-status { min-height: 1.5em; margin: 0; color: var(--plat-color-ink-secondary); }
.portal-list { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--plat-space-1); }
.portal-textarea { display: grid; gap: 4px; }
.portal-textarea > span { color: var(--plat-color-ink-secondary); font-size: var(--plat-font-size-xs); font-weight: 600; }
.portal-textarea textarea {
  width: 100%;
  padding: var(--plat-space-2);
  border: var(--plat-line-width) solid var(--plat-color-line);
  border-radius: var(--plat-radius-control);
  background: var(--plat-color-surface);
  color: var(--plat-color-ink);
  font-family: var(--plat-font-mono);
  font-size: var(--plat-font-size-sm);
}

.portal-list a { display: inline-block; min-height: 24px; padding: 2px 0; }

/* W144a: pages the canvas never drew use the older components inside the canvas's shell. Their colours follow the console's look
   (day, night, more contrast), which is a class on the shell and not the system setting the older tokens listen to. */
.au .portal-page {
  --plat-color-ground: var(--g);
  --plat-color-surface: var(--s);
  --plat-color-ink: var(--i);
  --plat-color-ink-secondary: var(--i2);
  --plat-color-line: var(--l);
  --plat-color-accent: var(--a);
  --plat-color-accent-tint: var(--at);
  --plat-color-success-ink: var(--ok);
  --plat-color-warning-ink: var(--wr);
  --plat-color-danger: var(--er);
  --plat-color-on-accent: var(--s);
  padding: 12px 14px 28px;
  color: var(--i);
  font-size: 13px;
  line-height: 19px;
}
.portal-noscript { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; margin: 0; padding: 8px 14px; background: #101828; color: #fff; font: 13px/19px system-ui, sans-serif; }
/* A plain link in such a page is a text link, not one of the canvas's buttons. */
.au .portal-page a { display: inline; padding: 0; border: 0; background: none; color: var(--a); font: inherit; text-align: inherit; text-decoration: underline; cursor: pointer; }

/* Passkey-gated VM browser terminal (/res/vms/{id}/terminal). */
.nv-vmt { overflow: hidden; border: 1px solid #1e293b; background: #0b1120; color: #e2e8f0; }
.nv-vmt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: #111827; border-bottom: 1px solid #1e293b; color: #cbd5e1; }
.nv-vmt-bar b { color: #f8fafc; font-size: 12.5px; }
.nv-vmt-bar .mut { color: #94a3b8; }
.nv-vmt-bar .btn.ghost { color: #e2e8f0; border-color: #334155; }
.nv-vmt-dots { display: inline-flex; gap: 5px; margin-right: 4px; }
.nv-vmt-dots i { width: 9px; height: 9px; border-radius: 50%; background: #334155; display: inline-block; }
.nv-vmt-dots i:nth-child(1) { background: #ef4444; }
.nv-vmt-dots i:nth-child(2) { background: #f59e0b; }
.nv-vmt-dots i:nth-child(3) { background: #10b981; }
.nv-vmt-stage { position: relative; background: #0b1120; cursor: text; }
.nv-vmt-screen {
  margin: 0;
  padding: 12px 14px;
  min-height: 440px;
  max-height: 68vh;
  overflow: auto;
  color: #e2e8f0;
  font: 13px/18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  tab-size: 8;
  outline: none;
}
.nv-vmt-input {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.nv-vmt-cur { background: #38bdf8; color: #0b1120; }
.vmt-b { font-weight: 700; color: #f8fafc; }
.vmt-d { opacity: 0.68; }
.vmt-inv { background: #e2e8f0; color: #0b1120; }
.vmt-c0 { color: #475569; }
.vmt-c1 { color: #f87171; }
.vmt-c2 { color: #4ade80; }
.vmt-c3 { color: #facc15; }
.vmt-c4 { color: #60a5fa; }
.vmt-c5 { color: #c084fc; }
.vmt-c6 { color: #22d3ee; }
.vmt-c7 { color: #e2e8f0; }
.vmt-c8 { color: #64748b; }
.vmt-c9 { color: #fca5a5; }
.vmt-c10 { color: #86efac; }
.vmt-c11 { color: #fde047; }
.vmt-c12 { color: #93c5fd; }
.vmt-c13 { color: #d8b4fe; }
.vmt-c14 { color: #67e8f9; }
.vmt-c15 { color: #ffffff; }
.portal-contact { min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1rem; }
.portal-contact-card { width: min(100%, 40rem); background: var(--surface, #fff); border: 1px solid var(--border, #d8dee9); border-radius: 16px; padding: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.portal-contact-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0; opacity: .78; }
.portal-contact-lead { margin: 0; opacity: .88; line-height: 1.5; }
.portal-contact-form { display: flex; flex-direction: column; gap: .85rem; }
.portal-contact-form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 550; }
.portal-contact-form input, .portal-contact-form select, .portal-contact-form textarea { font: inherit; font-weight: 400; padding: .55rem .75rem; border: 1px solid var(--border, #cbd5e1); border-radius: 10px; width: 100%; }
.portal-contact-actions { display: flex; align-items: center; gap: .75rem; margin-top: .25rem; }
.portal-contact-status { margin: 0; min-height: 1.25rem; font-size: .9rem; }
