:root {
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #edf9ff;
  background: #020c14;
  --bg: #020c14;
  --panel: rgba(4, 24, 37, .92);
  --panel-2: rgba(7, 35, 53, .88);
  --line: rgba(52, 178, 232, .38);
  --line-bright: #27b8f3;
  --cyan: #20b8ff;
  --cyan-soft: #73d8ff;
  --text-dim: #86a8b9;
  --green: #52e1a7;
  --red: #ff7587;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(4, 24, 35, .82), rgba(2, 12, 20, .96)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(24, 137, 185, .045) 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(24, 137, 185, .035) 80px),
    radial-gradient(circle at 50% 5%, #063b57 0, #020c14 42%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 35%, rgba(23, 177, 235, .08), transparent 18%),
    radial-gradient(circle at 82% 70%, rgba(23, 177, 235, .06), transparent 22%);
}

a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.18; }

.site-nav {
  min-height: 78px;
  border-bottom: 1px solid rgba(42, 170, 224, .25);
  background: rgba(1, 11, 18, .88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: max-content;
}
.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1bb6f6, #07547c);
  border: 1px solid #52ceff;
  box-shadow: 0 0 24px rgba(30, 183, 245, .26);
  clip-path: polygon(20% 0, 100% 0, 100% 72%, 72% 100%, 0 100%, 0 20%);
  color: #00101a;
  font-size: 18px;
  font-weight: 950;
  font-style: italic;
}
.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: .18em;
  font-weight: 800;
}
.brand-copy small {
  display: block;
  margin-top: 2px;
  color: #6c98ad;
  font-size: 8px;
  letter-spacing: .2em;
}
.nav-links, .top-nav, .actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-link {
  padding: 10px 12px;
  color: #9bb6c3;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-link:hover, .nav-link.active { color: #eefaff; }
.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(48, 179, 232, .42);
  margin: 0 6px;
}

button, .button {
  min-height: 42px;
  border: 1px solid rgba(51, 185, 240, .62);
  border-radius: 5px;
  padding: 11px 17px;
  color: #e9f9ff;
  background: linear-gradient(180deg, #078cc9, #055981);
  box-shadow: inset 0 0 18px rgba(75, 205, 255, .08), 0 0 0 1px rgba(0, 0, 0, .3);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}
button:hover:not(:disabled), .button:hover {
  transform: translateY(-2px);
  border-color: #75ddff;
  box-shadow: 0 0 20px rgba(24, 179, 239, .22);
}
button:disabled { opacity: .42; cursor: not-allowed; }
.ghost {
  color: #b9d7e5;
  background: rgba(5, 35, 52, .68);
}
.button-icon {
  min-width: 44px;
  padding-inline: 12px;
  font-size: 17px;
}

.page-shell, main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.page-heading {
  padding: 42px 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.page-heading h1 {
  margin-top: 7px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: .03em;
}
.eyebrow {
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.muted {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.65;
}

.landing-main {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  padding: 44px 0 70px;
}
.hero-panel {
  min-height: 500px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 70px 55px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(2, 44, 66, .65), rgba(2, 15, 24, .92)),
    radial-gradient(circle at 50% 0, rgba(18, 161, 221, .42), transparent 60%);
  border: 1px solid rgba(54, 193, 247, .55);
  clip-path: polygon(7% 0, 93% 0, 100% 14%, 100% 86%, 93% 100%, 7% 100%, 0 86%, 0 14%);
  box-shadow: inset 0 0 90px rgba(3, 116, 163, .14);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  z-index: -1;
  opacity: .32;
  background:
    linear-gradient(180deg, transparent, rgba(2, 14, 22, .74)),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(58, 189, 238, .18) 14px 15px),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(58, 189, 238, .12) 14px 15px);
  mask-image: linear-gradient(transparent, #000 35%);
}
.hero-content { max-width: 860px; }
.hero-kicker {
  display: inline-block;
  margin-bottom: 42px;
  padding: 10px 22px;
  color: #d8f5ff;
  border: 1px solid rgba(84, 205, 255, .7);
  background: rgba(13, 116, 159, .52);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.hero-title {
  font-size: clamp(38px, 6.4vw, 76px);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(59, 193, 247, .2);
}
.hero-title .accent { color: var(--cyan); }
.hero-copy {
  max-width: 720px;
  margin: 28px auto 0;
  color: #a8c0cc;
  line-height: 1.8;
}
.tech-line {
  width: min(390px, 70%);
  height: 1px;
  margin: 27px auto;
  background: linear-gradient(90deg, transparent, #28b9f6 50%, transparent);
  position: relative;
}
.tech-line::after {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid #dff8ff;
  background: #0b6f9b;
}
.landing-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.landing-actions .button { min-width: 190px; }
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
  border: 1px solid rgba(43, 165, 217, .28);
  background: rgba(3, 20, 31, .68);
}
.feature {
  padding: 25px;
  text-align: center;
}
.feature + .feature { border-left: 1px solid rgba(43, 165, 217, .22); }
.feature strong {
  display: block;
  margin-bottom: 7px;
  color: #e8f8ff;
  font-size: 13px;
  letter-spacing: .11em;
}

.hero {
  margin: 12px 0 26px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(6, 42, 62, .95), rgba(3, 22, 35, .94));
  box-shadow: inset 4px 0 0 rgba(31, 181, 241, .65), 0 18px 50px rgba(0, 0, 0, .16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.hero.compact { padding: 25px 30px; }
.hero h2 {
  margin: 7px 0;
  max-width: 650px;
  font-size: 28px;
}
.hero-stat {
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--cyan-soft);
  font-size: 43px;
  font-weight: 900;
  text-shadow: 0 0 22px rgba(60, 199, 255, .23);
}
.hero-stat small {
  color: #7da4b5;
  font-size: 10px;
  letter-spacing: .14em;
}
.flash {
  min-height: 25px;
  margin-bottom: 14px;
  color: #77eaba;
  font-size: 13px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 15px;
}
.card, .panel {
  border: 1px solid rgba(41, 142, 185, .34);
  background: linear-gradient(145deg, rgba(6, 31, 47, .97), rgba(3, 19, 31, .97));
  box-shadow: inset 0 1px rgba(110, 218, 255, .04);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
}
.card {
  min-height: 330px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(52, 177, 228, .12);
  transform: rotate(45deg);
  pointer-events: none;
}
.card.ready { border-color: rgba(61, 218, 165, .48); }
.card.in_use { border-color: rgba(255, 99, 123, .5); }
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}
.card-top h3 {
  font-size: 18px;
  letter-spacing: .08em;
}
.badge {
  display: inline-block;
  border: 1px solid rgba(58, 179, 229, .32);
  border-radius: 3px;
  padding: 5px 8px;
  background: rgba(13, 65, 91, .5);
  color: #93cbe4;
  font-size: 9px;
  font-weight: 800;
}
.badge.booting { color: #89d2ff; }
.badge.shutting_down { color: #ff9b75; border-color: rgba(255, 126, 82, .5); }
.badge.ready { border-color: rgba(68, 221, 168, .45); color: #69e5b4; background: rgba(16, 88, 65, .45); }
.badge.in_use { border-color: rgba(255, 102, 125, .5); color: #ff9aaa; background: rgba(104, 30, 45, .48); }
.badge.playing { border-color: #15c96c; color: #001b0d; background: #16c96b; }
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 16px 0;
  color: #83a8ba;
  font-size: 12px;
}
.session-clock {
  margin-top: 22px;
  text-align: center;
  color: #dff7ff;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: .06em;
  text-shadow: 0 0 18px rgba(36, 180, 239, .2);
}
.clock-label {
  margin: 5px 0 15px;
  color: #6d94a7;
  text-align: center;
  font-size: 10px;
  letter-spacing: .08em;
}
.spec-list {
  display: grid;
  gap: 3px;
  margin: 2px 0 12px;
  color: #b7d8e6;
  font-size: 12px;
}
.price-strip, .remote-ready {
  padding: 7px 10px;
  border: 1px solid rgba(27, 204, 104, .58);
  border-radius: 9px;
  background: rgba(6, 78, 48, .22);
  color: #34de84;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.remote-ready {
  margin-top: 7px;
  background: rgba(28, 58, 86, .72);
  color: #f0f8ff;
  border-color: rgba(99, 160, 222, .62);
}
.card.in_use {
  border: 2px solid #16c96b;
  background: linear-gradient(145deg, rgba(8, 87, 53, .94), rgba(4, 48, 32, .98));
}
.card.in_use .session-clock,
.card.in_use .spec-list { color: #effff7; }
.card.in_use .clock-label { color: #a9d8c3; }
.power-button {
  border-color: rgba(28, 206, 107, .62);
  background: rgba(4, 63, 39, .74);
  color: #eafff2;
}
.admin-button {
  min-width: 0;
}
.user-status {
  margin: 10px 0 17px;
  padding: 8px;
  border: 1px solid rgba(47, 180, 225, .27);
  color: #91cce5;
  text-align: center;
  font-size: 11px;
}
.card.ready .user-status { border-color: rgba(61, 219, 165, .36); color: #65dfad; }
.card.in_use .user-status { border-color: rgba(255, 100, 125, .38); color: #ff93a4; }
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.user-card .card-actions {
  width: 100%;
  padding-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.user-card .card-actions > button,
.user-card .card-actions > .button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 7px;
  line-height: 1.25;
  white-space: normal;
}
.user-card .card-actions > :only-child {
  grid-column: 1 / -1;
}
.panel {
  margin: 25px 0 50px;
  padding: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.audit-row {
  padding: 11px 0;
  border-top: 1px solid rgba(44, 128, 164, .22);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.auth-layout {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth-panel {
  width: min(460px, 100%);
  margin: 0;
  padding: 34px;
}
.auth-panel h1 {
  margin: 9px 0 8px;
  font-size: 32px;
}
.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 25px;
}
.form-stack label, .pc-settings label {
  display: grid;
  gap: 6px;
  color: #94bacb;
  font-size: 11px;
  font-weight: 700;
}
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(51, 185, 240, .35);
  border-radius: 4px;
  padding: 9px 11px;
  outline: none;
  color: #ecfaff;
  background: rgba(1, 13, 21, .88);
  font: inherit;
}
input:focus {
  border-color: #38bdf5;
  box-shadow: 0 0 0 3px rgba(32, 184, 255, .11);
}
.form-error {
  min-height: 22px;
  margin-top: 13px;
  color: #ff8797;
  font-size: 12px;
}
.admin-card {
  min-height: 590px;
}
.pc-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 12px;
}
.pc-settings label:first-child,
.pc-settings button {
  grid-column: 1 / -1;
}
.pc-settings button {
  min-height: 38px;
  padding-block: 8px;
}
.machine-id {
  margin: 2px 0 13px;
  color: #628a9d;
  font-size: 9px;
  overflow-wrap: anywhere;
}
.admin-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.admin-settings-grid .panel {
  margin-bottom: 0;
}
.compact-form {
  margin-top: 0;
}
.empty-state {
  grid-column: 1 / -1;
  padding: 55px 25px;
  border: 1px dashed rgba(52, 178, 232, .38);
  text-align: center;
}
.empty-state p { margin-top: 8px; }

.viewer-shell {
  margin: 8px 0 35px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #01070c;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.viewer-toolbar {
  min-height: 58px;
  padding: 9px 16px 9px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid rgba(37, 157, 207, .28);
  background: #061d2d;
}
#status { font-size: 12px; font-weight: 700; color: #bfeaff; }
.novnc-screen {
  min-height: 620px;
  padding: 30px;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    linear-gradient(rgba(4, 18, 25, .78), rgba(4, 18, 25, .78)),
    repeating-linear-gradient(90deg, #0b2735 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, #0b2735 0 1px, #031018 1px 40px);
}
.novnc-brand {
  margin-bottom: 17px;
  color: #28baff;
  font-size: 58px;
  font-weight: 950;
  letter-spacing: -.06em;
  text-shadow: 0 0 32px rgba(25, 184, 251, .32);
}

@media (max-width: 760px) {
  .nav-inner { width: min(100% - 24px, 1180px); }
  .nav-links .nav-link, .nav-divider { display: none; }
  .page-shell, main, .landing-main { width: min(100% - 24px, 1180px); }
  .page-heading { padding-top: 28px; align-items: start; flex-direction: column; }
  .hero-panel { min-height: 470px; padding: 54px 24px; clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }
  .hero-kicker { margin-bottom: 28px; }
  .hero-title { letter-spacing: .08em; }
  .hero { align-items: start; gap: 22px; }
  .hero-stat { font-size: 34px; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid rgba(43, 165, 217, .22); }
  .viewer-toolbar { align-items: start; }
  .viewer-toolbar > div { display: flex; }
  .audit-row { flex-direction: column; gap: 4px; }
  .admin-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand-copy small { display: none; }
  .nav-links .button { padding-inline: 11px; }
  .hero { padding: 21px 18px; }
  .hero h2 { font-size: 22px; }
  .hero-stat { min-width: 62px; }
  .grid { grid-template-columns: 1fr; }
  .viewer-toolbar { flex-direction: column; }
}
