@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Nunito:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg-0: #0f1218;
  --bg-1: #171c24;
  --bg-2: #1a2230;
  --panel: rgba(20, 24, 33, 0.84);
  --line: rgba(166, 176, 196, 0.3);
  --text: #f5f1e6;
  --muted: #c8c2b4;
  --accent: #d6ae56;
  --accent-strong: #b3863a;
  --accent-alt: #5d8fe0;
  --ok: #5fa37a;
  --warn: #d49a3a;
  --danger: #d77272;
  --vivi-eye: #f4de94;
  --parchment: #e3d5b0;
  --ink: #2c2416;
  --radius: 18px;
  --shadow: 0 24px 45px rgba(7, 9, 13, 0.55);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  padding: 26px 16px 40px;
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(90% 70% at 50% -10%, rgba(214, 174, 86, 0.24) 0%, transparent 60%),
    radial-gradient(70% 60% at 18% 22%, rgba(93, 143, 224, 0.26) 0%, transparent 58%),
    radial-gradient(80% 80% at 85% 90%, rgba(7, 9, 13, 0.85) 0%, transparent 65%),
    linear-gradient(165deg, var(--bg-2) 0%, #121822 45%, #19150f 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(245, 236, 212, 0.015) 0,
      rgba(245, 236, 212, 0.015) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(7, 9, 13, 0.02) 0,
      rgba(7, 9, 13, 0.02) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 22% 14%, rgba(227, 213, 176, 0.06), transparent 44%);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(65px);
  pointer-events: none;
}

.ambient-top {
  top: -120px;
  right: -120px;
  background: rgba(214, 174, 86, 0.28);
}

.ambient-bottom {
  left: -140px;
  bottom: -170px;
  background: rgba(93, 143, 224, 0.24);
}

.layout {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 40px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(227, 213, 176, 0.12), transparent 38%),
    linear-gradient(325deg, rgba(93, 143, 224, 0.16), transparent 44%);
}

.panel > * {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: grid;
  gap: 14px;
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -78px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(93, 143, 224, 0.24),
    rgba(214, 174, 86, 0.08) 42%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.hero-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hero-vivi-portrait {
  width: clamp(88px, 12vw, 132px);
  height: auto;
  justify-self: end;
  filter: drop-shadow(0 10px 16px rgba(4, 8, 15, 0.52));
}

.panel-title-with-vivi {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  row-gap: 6px;
  text-align: center;
}

.vivi-motif {
  --look-x: 0px;
  --look-y: 0px;
  --blink-scale: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(93, 143, 224, 0.34);
  background: radial-gradient(circle at 50% 35%, #0b1427 0%, #010309 76%);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  vertical-align: middle;
  user-select: none;
  box-shadow:
    inset 0 -8px 12px rgba(0, 0, 0, 0.4),
    0 5px 12px rgba(0, 0, 0, 0.28),
    0 0 14px rgba(255, 233, 130, 0.08);
}

.vivi-motif.hurt {
  gap: 0;
  animation: vivi-ouch 360ms ease-out;
}

.vivi-eye {
  width: 5px;
  height: 11px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff9ca 0%, var(--vivi-eye) 60%, #ce9813 100%);
  box-shadow: 0 0 9px rgba(255, 233, 130, 0.56);
  transform: translate(var(--look-x), var(--look-y)) scaleY(var(--blink-scale));
  transform-origin: center 58%;
  transition: transform 80ms linear;
  will-change: transform;
}

.vivi-motif.hurt .vivi-eye {
  width: 10px;
  height: 15px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.vivi-motif.hurt .vivi-eye::before {
  display: block;
  color: var(--vivi-eye);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 233, 130, 0.72);
}

.vivi-motif.hurt .vivi-eye:first-child::before {
  content: ">";
}

.vivi-motif.hurt .vivi-eye:last-child::before {
  content: "<";
}

@keyframes vivi-ouch {
  0% {
    transform: translateX(0) rotate(0deg);
  }

  20% {
    transform: translateX(-1.5px) rotate(-2deg);
  }

  40% {
    transform: translateX(1.5px) rotate(2deg);
  }

  60% {
    transform: translateX(-1px) rotate(-1.4deg);
  }

  80% {
    transform: translateX(1px) rotate(1.1deg);
  }

  100% {
    transform: translateX(0) rotate(0deg);
  }
}

.auth-compact {
  margin-left: 0;
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.auth-compact .status-pill {
  justify-self: end;
}

.auth-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.node-connection-indicator {
  margin: 2px 0 0;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.node-connection-light {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.node-connection-indicator.connected {
  color: #daf8df;
}

.node-connection-indicator.connected .node-connection-light {
  background: var(--ok);
  box-shadow:
    0 0 0 2px rgba(95, 163, 122, 0.28),
    0 0 10px rgba(95, 163, 122, 0.62);
}

.node-connection-indicator.disconnected {
  color: #ffd9d4;
}

.node-connection-indicator.disconnected .node-connection-light {
  background: var(--danger);
  box-shadow:
    0 0 0 2px rgba(215, 114, 114, 0.24),
    0 0 10px rgba(215, 114, 114, 0.5);
}

.node-connection-indicator.pending {
  color: #ffe6b6;
}

.node-connection-indicator.pending .node-connection-light {
  background: var(--warn);
  box-shadow:
    0 0 0 2px rgba(212, 154, 58, 0.24),
    0 0 10px rgba(212, 154, 58, 0.5);
  animation: node-connection-pending-pulse 1.2s ease-in-out infinite;
}

@keyframes node-connection-pending-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.72;
  }
}

.auth-button {
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 0.8rem;
}

.unauth-vivi-stage {
  display: none;
  position: relative;
  width: clamp(220px, 42vw, 320px);
  aspect-ratio: 1 / 1;
  place-items: center;
  border-radius: 50%;
  isolation: isolate;
  border: 1px solid rgba(172, 180, 198, 0.32);
  background:
    radial-gradient(70% 65% at 50% 18%, rgba(243, 228, 164, 0.2) 0%, transparent 76%),
    radial-gradient(72% 72% at 30% 80%, rgba(93, 143, 224, 0.22) 0%, transparent 72%),
    linear-gradient(150deg, rgba(8, 14, 24, 0.94), rgba(17, 27, 40, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(239, 227, 191, 0.08),
    0 24px 46px rgba(1, 4, 10, 0.62),
    0 0 55px rgba(214, 174, 86, 0.18);
}

.unauth-vivi-stage::before,
.unauth-vivi-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.unauth-vivi-stage::before {
  inset: -14%;
  z-index: -1;
  background: radial-gradient(circle, rgba(93, 143, 224, 0.26) 0%, transparent 72%);
}

.unauth-vivi-stage::after {
  inset: 16%;
  background: radial-gradient(circle at 50% 36%, rgba(240, 227, 180, 0.16), transparent 78%);
}

.vivi-face {
  width: clamp(142px, 27vw, 194px);
  height: clamp(142px, 27vw, 194px);
  gap: clamp(18px, 4vw, 28px);
  border-width: 2px;
  cursor: default;
  box-shadow:
    inset 0 -18px 24px rgba(0, 0, 0, 0.48),
    0 16px 26px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(255, 233, 130, 0.12);
}

.vivi-face .vivi-eye {
  width: clamp(12px, 2.4vw, 16px);
  height: clamp(26px, 5vw, 34px);
  box-shadow: 0 0 14px rgba(255, 233, 130, 0.66);
  transition-duration: 44ms;
}

.vivi-face.hurt .vivi-eye {
  width: clamp(24px, 5.2vw, 34px);
  height: clamp(34px, 7.2vw, 48px);
}

.vivi-face.hurt .vivi-eye::before {
  font-size: clamp(34px, 8.4vw, 50px);
  font-weight: 800;
  text-shadow: 0 0 18px rgba(255, 233, 130, 0.9);
}

body.is-unauthenticated .layout {
  width: min(600px, 100%);
  min-height: calc(100vh - 66px);
  align-content: center;
}

body.is-unauthenticated .layout > :not(.hero) {
  display: none !important;
}

body.is-unauthenticated .hero {
  min-height: min(78vh, 700px);
  display: grid;
  align-items: center;
  padding: clamp(26px, 5vw, 44px);
}

body.is-unauthenticated .hero::after {
  display: none;
}

body.is-unauthenticated .hero-top-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

body.is-unauthenticated .hero-copy,
body.is-unauthenticated .hero-vivi-portrait,
body.is-unauthenticated .node-connection-indicator {
  display: none;
}

body.is-unauthenticated .auth-compact {
  width: min(440px, 100%);
  margin: 0 auto;
  justify-items: center;
  text-align: center;
  gap: 20px;
}

body.is-unauthenticated .unauth-vivi-stage {
  display: grid;
}

body.is-unauthenticated .auth-action-row {
  width: min(220px, 100%);
  justify-content: center;
}

body.is-unauthenticated .auth-action-row .button {
  width: 100%;
}

body.is-unauthenticated .auth-button {
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.94rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.schedule-prompt-modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 15, 0.78);
  backdrop-filter: blur(4px);
}

.schedule-prompt-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(214, 174, 86, 0.45);
  background: linear-gradient(160deg, rgba(13, 22, 38, 0.98), rgba(10, 18, 32, 0.96));
  box-shadow: 0 30px 56px rgba(2, 5, 10, 0.72);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.schedule-prompt-modal h2 {
  margin: 0;
  font-size: 1.02rem;
}

.schedule-prompt-modal .muted {
  margin: 0;
}

.schedule-prompt-modal-form {
  gap: 10px;
}

.schedule-prompt-modal-form textarea {
  min-height: 220px;
}

.schedule-prompt-modal-actions {
  margin: 4px 0 0;
  justify-content: flex-end;
}

h1,
h2 {
  margin: 0;
  line-height: 1.24;
  font-weight: 600;
  font-family: "Cinzel", serif;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
  max-width: 24ch;
  text-shadow: 0 3px 20px rgba(1, 5, 12, 0.5);
}

h2 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.intro,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.96rem;
}

.view-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.view-link {
  border-radius: 999px;
  border: 1px solid rgba(166, 176, 196, 0.36);
  background: linear-gradient(145deg, rgba(21, 27, 38, 0.76), rgba(24, 31, 44, 0.56));
  color: var(--muted);
  padding: 7px 12px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.view-link:hover {
  color: #fbf2dd;
  border-color: rgba(214, 174, 86, 0.45);
  transform: translateY(-1px);
}

.view-link.active {
  color: #2c2416;
  border-color: rgba(214, 174, 86, 0.7);
  background: linear-gradient(135deg, rgba(214, 174, 86, 0.96), rgba(179, 134, 58, 0.9));
  box-shadow: 0 8px 20px rgba(76, 56, 24, 0.35);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.button {
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.accent {
  color: #2c1808;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(122, 73, 35, 0.34);
}

.button.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(26, 46, 74, 0.82), rgba(23, 38, 63, 0.64));
}

.button.danger {
  color: #ffedeb;
  background: linear-gradient(135deg, #ae4f44, var(--danger));
  box-shadow: 0 12px 24px rgba(112, 38, 32, 0.34);
}

.status-pill {
  display: inline-flex;
  margin: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-pill.pending {
  background: rgba(93, 143, 224, 0.16);
  border-color: rgba(127, 170, 255, 0.44);
  color: #dff1ff;
}

.status-pill.ok {
  background: rgba(152, 215, 165, 0.14);
  border-color: rgba(152, 215, 165, 0.4);
  color: #e0f8e4;
}

.status-pill.warn {
  background: rgba(240, 212, 135, 0.14);
  border-color: rgba(240, 212, 135, 0.46);
  color: #fff3cf;
}

.status-pill.error {
  background: rgba(201, 107, 100, 0.16);
  border-color: rgba(201, 107, 100, 0.46);
  color: #ffe0dc;
}

.query-form {
  display: grid;
  gap: 10px;
}

.query-form label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e3d5b0;
}

.query-form textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(127, 170, 255, 0.42);
  background: rgba(8, 19, 39, 0.74);
  color: var(--text);
  padding: 11px 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  resize: vertical;
  min-height: 130px;
}

.query-form input,
.query-form select {
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(127, 170, 255, 0.42);
  background: rgba(8, 19, 39, 0.74);
  color: var(--text);
  padding: 10px 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.query-form textarea:focus-visible {
  outline: 2px solid rgba(214, 174, 86, 0.76);
  outline-offset: 1px;
}

.query-form input:focus-visible,
.query-form select:focus-visible {
  outline: 2px solid rgba(214, 174, 86, 0.76);
  outline-offset: 1px;
}

.file-entry-list {
  display: grid;
  gap: 12px;
}

.schedule-list {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.control-plane-node-inventory {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(214, 174, 86, 0.56);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(8, 22, 45, 0.88), rgba(10, 24, 47, 0.66));
  box-shadow: inset 0 0 0 1px rgba(214, 174, 86, 0.2);
}

.control-plane-node-inventory .query-jobs-toolbar {
  margin: 0;
}

.control-plane-node-inventory .schedule-list {
  margin: 0;
}

.control-plane-node-inventory .schedule-entry {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.control-plane-node-inventory .schedule-entry:hover {
  border-color: transparent;
  transform: none;
}

.control-plane-node-inventory .schedule-entry.selected {
  border-color: transparent;
  box-shadow: none;
}

.control-plane-node-inventory .schedule-entry:focus-visible {
  outline-offset: 4px;
}

.vivi-node-disconnected-badge {
  margin: 4px 0;
  border-radius: 16px;
  border: 1px solid rgba(215, 114, 114, 0.48);
  background: linear-gradient(140deg, rgba(130, 35, 35, 0.34), rgba(72, 20, 20, 0.26));
  box-shadow: 0 14px 30px rgba(82, 23, 23, 0.3);
  color: #ffe5e2;
  font-family: "Cinzel", serif;
  font-size: clamp(1.02rem, 1.8vw, 1.34rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 28px 14px;
}

.host-machine-only-disclosure {
  display: grid;
  gap: 14px;
}

.host-machine-only-disclosure > summary {
  cursor: pointer;
  list-style-position: inside;
  color: #dfcb9c;
  font-size: 0.94rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
}

.host-machine-only-disclosure[open] > summary {
  margin-bottom: 2px;
}

.host-machine-subpanel {
  border-top: 1px solid rgba(214, 174, 86, 0.25);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.connect-machine-node-disclosure {
  display: grid;
  gap: 10px;
}

.connect-machine-node-disclosure > summary {
  cursor: pointer;
  list-style-position: inside;
  color: #dfcb9c;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
}

.connect-machine-node-disclosure[open] > summary {
  margin-bottom: 2px;
}

.setup-flow {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(214, 174, 86, 0.2);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(19, 26, 44, 0.48), rgba(11, 17, 30, 0.34));
}

.setup-flow .muted {
  margin: 0;
}

.setup-flow .console-output {
  margin-top: 2px;
}

.setup-flow-step {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(231, 237, 248, 0.95);
  line-height: 1.55;
}

.setup-flow-step-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 3px 9px;
  margin-top: 2px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(214, 174, 86, 0.96), rgba(168, 125, 49, 0.9));
  color: #2f2211;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 18px rgba(90, 62, 20, 0.28);
}

.setup-flow-step-content {
  flex: 1;
  min-width: 0;
}

.setup-flow-step-content a {
  color: #d5e5fb;
  text-underline-offset: 2px;
}

.setup-flow-step-content a:hover {
  color: #fbf2dd;
}

.setup-flow-step-list {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  color: rgba(206, 217, 242, 0.94);
}

.setup-flow-step-note {
  margin: 8px 0 0;
  color: rgba(206, 217, 242, 0.86);
  font-size: 0.84rem;
}

.setup-flow-step-note + .setup-flow-step-note {
  margin-top: 4px;
}

.setup-flow-actions {
  margin: 0;
}

.setup-troubleshooting {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(214, 174, 86, 0.18);
}

.setup-troubleshooting > summary {
  cursor: pointer;
  list-style-position: inside;
  color: #dfcb9c;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
}

.setup-troubleshooting[open] > summary {
  margin-bottom: 2px;
}

.query-jobs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

.query-jobs-toolbar-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.query-jobs-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.query-jobs-title {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
  color: #dfcb9c;
}

.control-plane-node-connected-badge {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
}

.query-job-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.query-job-list.query-job-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 144px;
}

.query-job-entry {
  border: 1px solid rgba(118, 146, 191, 0.35);
  background: linear-gradient(145deg, rgba(13, 23, 38, 0.84), rgba(17, 30, 49, 0.66));
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.query-job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.query-job-query {
  margin: 0;
  color: #f0ebd9;
  font-size: 0.9rem;
  font-weight: 500;
}

.query-job-meta {
  margin: 0;
  color: rgba(206, 217, 242, 0.9);
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.5;
}

.query-job-preview {
  margin: 0;
  min-height: 80px;
  max-height: 240px;
}

.session-env-keys-wrap {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.session-env-special-block {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.session-env-advanced-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(214, 174, 86, 0.3);
  display: grid;
  gap: 10px;
}

.session-env-advanced-block > summary {
  cursor: pointer;
  list-style-position: inside;
  color: #dfcb9c;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
}

.session-env-advanced-block[open] > summary {
  margin-bottom: 4px;
}

.setup-troubleshooting-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: rgba(206, 217, 242, 0.92);
}

.setup-troubleshooting-list code {
  color: #d5e5fb;
}

.session-env-special-title {
  margin: 0;
  font-size: 0.94rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
  color: #dfcb9c;
}

.session-env-keys-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.session-env-key {
  color: #d5e5fb;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
}

.session-env-empty {
  list-style: none;
  margin-left: -20px;
}

.schedule-entry {
  border: 1px solid rgba(118, 146, 191, 0.35);
  background: linear-gradient(145deg, rgba(13, 23, 38, 0.84), rgba(17, 30, 49, 0.66));
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.schedule-entry:hover {
  border-color: rgba(214, 174, 86, 0.56);
  transform: translateY(-1px);
}

.schedule-entry.selected {
  border-color: rgba(214, 174, 86, 0.78);
  box-shadow: 0 0 0 1px rgba(214, 174, 86, 0.27);
}

.schedule-entry:focus-visible {
  outline: 2px solid rgba(214, 174, 86, 0.78);
  outline-offset: 2px;
}

.schedule-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-entry-title {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
  color: #dfcb9c;
}

.schedule-button-row {
  margin: 2px 0;
}

.file-entry {
  border: 1px solid rgba(118, 146, 191, 0.35);
  background: linear-gradient(145deg, rgba(13, 23, 38, 0.84), rgba(17, 30, 49, 0.66));
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.file-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-entry-title {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Cinzel", serif;
  color: #dfcb9c;
}

.file-entry-grid {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 10px;
}

.file-entry-content {
  display: grid;
  gap: 8px;
}

.file-entry-content textarea {
  min-height: 120px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-grid div {
  border-radius: 10px;
  border: 1px solid rgba(118, 146, 191, 0.32);
  background: linear-gradient(155deg, rgba(12, 20, 34, 0.72), rgba(11, 19, 32, 0.55));
  padding: 10px;
}

.detail-grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(230, 213, 166, 0.86);
  margin-bottom: 6px;
}

.detail-grid dd {
  margin: 0;
  font-size: 0.86rem;
  word-break: break-word;
}

.console-output {
  margin: 14px 0 0;
  border-radius: 12px;
  border: 1px solid rgba(118, 146, 191, 0.34);
  background: linear-gradient(165deg, rgba(7, 14, 25, 0.92), rgba(10, 19, 33, 0.78));
  color: #d9e8ff;
  padding: 14px;
  min-height: 110px;
  max-height: 380px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.console-output.friendly-output {
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.console-output.loading-output {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

.query-loading-gif {
  width: min(172px, 100%);
  height: auto;
  border-radius: 10px;
}

.muted.neutral {
  color: var(--muted);
}

.muted.success {
  color: #daf8df;
}

.muted.error {
  color: #ffd9d4;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88em;
  color: #e9ca7a;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in 460ms ease forwards;
}

.layout > :nth-child(2) {
  animation-delay: 90ms;
}

.layout > :nth-child(3) {
  animation-delay: 180ms;
}

.layout > :nth-child(4) {
  animation-delay: 270ms;
}

.layout > :nth-child(5) {
  animation-delay: 360ms;
}

.layout > :nth-child(6) {
  animation-delay: 450ms;
}

.layout > :nth-child(7) {
  animation-delay: 540ms;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  body {
    padding: 16px 12px 28px;
  }

  .panel {
    padding: 16px;
  }

  .button-row {
    flex-direction: column;
  }

  .setup-flow-step {
    flex-direction: column;
    gap: 6px;
  }

  .setup-flow-step-label {
    margin-top: 0;
  }

  .button {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .schedule-prompt-modal {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .schedule-prompt-modal-actions {
    justify-content: stretch;
  }

  .hero-top-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero::after {
    display: none;
  }

  .hero-vivi-portrait {
    width: clamp(64px, 24vw, 98px);
  }

  .vivi-motif {
    width: 32px;
    height: 32px;
    gap: 6px;
  }

  .vivi-eye {
    width: 4px;
    height: 9px;
  }

  .auth-compact {
    width: max-content;
    margin-left: auto;
    justify-items: end;
  }

  .auth-compact .status-pill {
    justify-self: end;
  }

  .auth-action-row {
    justify-content: flex-end;
  }

  .node-connection-indicator {
    justify-self: end;
  }

  .auth-action-row .button {
    width: auto;
  }

  .file-entry-grid {
    grid-template-columns: 1fr;
  }

  .file-entry-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-entry-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .query-jobs-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .query-jobs-toolbar-actions {
    justify-content: flex-start;
  }

  .query-jobs-toolbar .button {
    width: auto;
  }

  .query-job-header {
    flex-direction: column;
    align-items: flex-start;
  }

  body.is-unauthenticated {
    padding: 14px 12px 22px;
  }

  body.is-unauthenticated .layout {
    min-height: calc(100vh - 36px);
  }

  body.is-unauthenticated .panel.hero {
    padding: 18px 16px;
  }

  body.is-unauthenticated .auth-compact {
    width: 100%;
    gap: 16px;
  }

  body.is-unauthenticated .unauth-vivi-stage {
    width: clamp(190px, 64vw, 286px);
  }

  body.is-unauthenticated .auth-action-row,
  body.is-unauthenticated .auth-action-row .button {
    width: min(220px, 100%);
  }
}
