:root {
  --bg: #03070b;
  --surface: #071017;
  --surface-2: #0d1821;
  --line: #26394b;
  --line-strong: #386da0;
  --text: #f4f7fb;
  --muted: #a9b8c8;
  --link: #75bfff;
  --gold: #ffad25;
  --green: #8fe3ad;
  --red: #ff9f91;
  --blue: #8ec5ff;
  --blue-hot: #2f8cff;
  --radius: 8px;
  --panel-glow: 0 0 26px rgb(47 140 255 / 16%);
  --shadow: 0 20px 80px rgb(0 0 0 / 35%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgb(47 140 255 / 15%), transparent 28rem),
    linear-gradient(180deg, #081119 0%, var(--bg) 42%, #050a0e 100%);
  font-family: inherit;
}

main {
  position: relative;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

nav,
header {
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
}

.brand::before {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgb(255 173 37 / 94%), rgb(47 140 255 / 72%)),
    #101820;
  box-shadow: 0 0 18px rgb(255 173 37 / 30%);
  content: "";
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-decoration: none;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  color: var(--text);
  text-shadow: 0 0 18px rgb(117 191 255 / 24%);
}

h2 {
  color: var(--text);
}

p,
li,
label,
td,
th {
  color: var(--muted);
}

section {
  border-top-color: var(--line);
}

.hero {
  min-height: min(58vh, 560px);
  display: grid;
  align-content: center;
  padding: 34px 0 54px;
}

.hero h1 {
  max-width: 840px;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.94;
  text-transform: uppercase;
}

.lede {
  color: #d9e4ef;
}

.sections,
section {
  border-color: var(--line);
}

.section,
.field-row,
.system-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(17 31 43 / 80%), rgb(5 12 18 / 82%));
  box-shadow: var(--panel-glow);
}

.section {
  padding: 20px;
}

a.button,
.button-link,
button,
.disabled,
.tab {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-2);
  font-weight: 800;
  text-decoration: none;
}

a.button,
button[type="submit"]:not(.copy-token) {
  border-color: var(--gold);
  color: #091118;
  background: var(--gold);
}

a.secondary,
.button-link,
.tab {
  color: var(--text);
}

.disabled {
  color: var(--muted);
  background: rgb(16 26 34 / 70%);
}

input,
select,
textarea {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-2);
}

code,
.copy-token {
  color: #091118;
  background: var(--text);
}

.status,
.health,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.2;
}

.status,
.health,
.badge.warn,
.status.in_progress {
  color: #091118;
  background: var(--gold);
}

.status.admin,
.health:not(.verified),
.status.deferred,
.badge.info {
  color: #091118;
  background: var(--blue);
}

.health.verified,
.badge.good,
.status.pending {
  color: #071016;
  background: var(--green);
}

.badge.bad,
.status.failed {
  color: #071016;
  background: var(--red);
}

.success {
  color: var(--green);
}

.error,
.notice {
  color: var(--red);
}

.muted,
dt {
  color: var(--muted);
}

.tabs {
  margin-bottom: 16px;
}

.tab[aria-current="page"] {
  border-color: var(--green);
  color: #071016;
  background: var(--green);
}

.table-wrap,
table {
  border-radius: var(--radius);
}

table {
  background: rgb(5 12 18 / 72%);
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

th,
td {
  border-bottom-color: var(--line);
}

tbody tr:hover td {
  background: rgb(47 140 255 / 10%);
}

dl {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgb(5 12 18 / 64%);
}

.edit-handle form {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .brand {
    letter-spacing: 1.2px;
  }

  .hero {
    min-height: auto;
    padding: 12px 0 34px;
  }

  .hero h1,
  h1 {
    font-size: 36px;
  }

  table {
    min-width: 760px;
  }
}

.public-hero {
  width: auto;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 56px;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 86%), rgb(0 0 0 / 20%) 48%, rgb(0 0 0 / 72%)),
    linear-gradient(180deg, rgb(0 0 0 / 34%), rgb(0 0 0 / 72%)),
    url("/static/design-lab-assets/discord-server-banner.png") center / cover no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  flex-wrap: nowrap;
  position: relative;
  z-index: 100;
  min-height: 86px;
  margin: 0;
  padding: 12px 34px;
  border-bottom: 1px solid rgb(118 165 210 / 24%);
  background: rgb(0 0 0 / 48%);
  backdrop-filter: blur(10px);
}

.site-nav .brand {
  gap: 14px;
  letter-spacing: 4px;
}

.site-nav .brand::before {
  display: none;
}

.site-nav .brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.site-nav .nav-links {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 34px;
}

.site-nav .nav-links a {
  position: relative;
  z-index: 1;
  min-height: 34px;
  color: #d8e0e8;
  transition:
    color 160ms ease,
    text-shadow 160ms ease,
    transform 120ms ease;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  color: var(--text);
  text-shadow: 0 0 14px rgb(117 191 255 / 42%);
}

.site-nav .nav-indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 16px rgb(255 173 37 / 74%);
  transition:
    transform 180ms ease,
    width 180ms ease,
    opacity 160ms ease;
  pointer-events: none;
}

.hamburger-menu {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgb(117 191 255 / 38%);
  border-radius: 6px;
  background: rgb(7 16 22 / 72%);
}

.hamburger-menu span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 10px rgb(117 191 255 / 48%);
  transition:
    transform 160ms ease,
    opacity 120ms ease;
}

.hamburger-menu.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-menu.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.cinematic-hero {
  min-height: calc(100vh - 260px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 52px 24px 70px;
  text-align: center;
}

.hero-crest {
  width: clamp(260px, 34vw, 520px);
  height: clamp(260px, 34vw, 520px);
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgb(117 191 255 / 42%));
}

.ornament-line {
  width: min(520px, 72vw);
  height: 20px;
  margin: 0 0 18px;
  border-top: 2px solid rgb(255 173 37 / 66%);
}

.ornament-line span {
  display: block;
  width: 18px;
  height: 18px;
  margin: -10px auto 0;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
}

.public-hero .lede {
  max-width: 760px;
  color: #d6e0ea;
  font-size: 21px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tactical-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100% - 64px, 1640px);
  margin: 0 auto;
  padding: 24px 28px;
  border: 1px solid rgb(255 173 37 / 30%);
  background: linear-gradient(180deg, rgb(7 16 22 / 86%), rgb(5 12 18 / 94%));
  box-shadow: var(--shadow);
}

.feature-grid article {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.public-hero .actions {
  justify-content: center;
}

.public-hero .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  text-decoration: none;
}

.public-hero .button.primary {
  border-color: var(--gold);
  color: #091118;
  background: var(--gold);
  font-weight: 700;
}

.public-hero .button.secondary {
  background: transparent;
}

.public-hero .button.disabled {
  cursor: default;
}

.command-layout {
  display: block;
  width: auto;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 44px;
  border: 1px solid rgb(86 123 156 / 28%);
  background:
    linear-gradient(180deg, rgb(3 7 11 / 70%), rgb(3 7 11 / 96%)),
    url("/static/design-lab-assets/orbital-fleet.png") top right / min(100%, 1680px) auto no-repeat;
}

.command-site-nav form {
  margin: 0;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  width: min(100% - 48px, 1560px);
  margin: 28px auto 0;
}

.dashboard-shell {
  grid-template-columns: minmax(0, 1fr);
  width: min(100% - 48px, 1260px);
}

.subpage-nav {
  position: sticky;
  top: 22px;
  align-self: start;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(7 16 22 / 88%), rgb(4 10 15 / 94%));
  box-shadow: var(--panel-glow);
}

.subpage-nav strong {
  display: block;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.subpage-nav nav {
  display: grid;
  gap: 8px;
}

.subpage-nav a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}

.subpage-nav a.active,
.subpage-nav a:hover {
  border-color: var(--blue-hot);
  background: rgb(47 140 255 / 16%);
  box-shadow: inset 3px 0 0 var(--blue-hot);
}

.subpage-nav small {
  color: var(--muted);
  font-size: 12px;
}

.page-content {
  min-width: 0;
}

.console-hero {
  min-height: 250px;
  display: flex;
  align-items: center;
  padding: 38px 42px;
  background:
    linear-gradient(90deg, rgb(3 7 11 / 82%), rgb(3 7 11 / 28%)),
    url("/static/design-lab-assets/orbital-fleet.png") center right / cover no-repeat;
}

.console-hero h1,
.review-hero h1 {
  margin-bottom: 10px;
  font-size: 52px;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow.warn {
  color: var(--gold);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.command-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.summary-panel,
.content-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(17 31 43 / 88%), rgb(5 12 18 / 88%));
  box-shadow: var(--panel-glow);
}

.summary-panel {
  min-width: 0;
  padding: 18px;
}

.command-grid .summary-panel {
  display: grid;
  grid-template-rows: 20px 44px 34px minmax(0, auto);
  align-content: start;
}

.command-grid .summary-panel > .eyebrow,
.command-grid .summary-panel > h2,
.command-grid .summary-panel > .panel-title-row,
.command-grid .summary-panel > .badge,
.command-grid .summary-panel > p:not(.eyebrow) {
  margin: 0;
}

.command-grid .summary-panel > h2,
.command-grid .summary-panel > .panel-title-row {
  align-self: start;
}

.command-grid .summary-panel > .badge {
  align-self: start;
  justify-self: start;
}

.panel-title-row,
.popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-title-row h2,
.popover-header h2 {
  margin-top: 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-color: rgb(117 191 255 / 38%);
  color: var(--text);
  background: rgb(7 16 22 / 72%);
}

.verification-popover {
  width: min(92vw, 560px);
  margin: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(145deg, rgb(12 25 35 / 98%), rgb(4 10 15 / 98%));
  box-shadow: var(--shadow), 0 0 38px rgb(47 140 255 / 22%);
}

.verification-popover::backdrop {
  background: rgb(0 0 0 / 58%);
  backdrop-filter: blur(3px);
}

.content-band {
  margin-top: 18px;
  padding: 22px;
}

.review-hero,
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.review-hero {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(5 12 18 / 74%);
}

.metric-cluster {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgb(5 12 18 / 74%);
}

.metric-cluster strong {
  display: grid;
  min-width: 110px;
  padding: 16px;
  color: var(--gold);
  font-size: 24px;
}

.metric-cluster strong + strong {
  border-left: 1px solid var(--line);
}

.metric-cluster span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.filter-row {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(16 26 34 / 60%);
}

.filter-row form,
.filters,
.actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-list {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 12px 20px;
  margin: 0;
}

.field-row {
  display: contents;
}

.field-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.operational-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  padding: 16px;
}

.operational-status div,
.system-card div {
  display: grid;
  gap: 6px;
}

.system-card strong {
  color: var(--text);
}

.system-card span {
  color: var(--green);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.blue {
  background: var(--blue-hot);
}

.loading-note {
  display: none;
  margin: 10px 0 0;
  color: var(--green);
  font-size: 14px;
}

form.submitting .loading-note {
  display: block;
}

@media (max-width: 780px) {
  .site-nav {
    min-height: 68px;
    padding: 8px 14px;
  }

  .site-nav .brand {
    min-width: 0;
    gap: 10px;
  }

  .site-nav .brand img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }

  .site-nav .brand span {
    max-width: calc(100vw - 170px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 3px;
  }

  .hamburger-menu {
    display: block;
    flex: 0 0 auto;
  }

  .site-nav .nav-links {
    display: none;
  }

  .site-nav .nav-links.is-open {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    z-index: 200;
    display: grid;
    min-width: min(280px, calc(100vw - 24px));
    gap: 0;
    margin-top: 0;
    padding: 8px;
    border: 1px solid rgb(117 191 255 / 38%);
    border-radius: var(--radius);
    background: #03070b;
    box-shadow: var(--shadow), 0 0 28px rgb(47 140 255 / 22%);
  }

  .site-nav .nav-links.is-open a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 6px;
    letter-spacing: 1.5px;
  }

  .site-nav .nav-links.is-open a.active {
    background: rgb(47 140 255 / 18%);
  }

  .site-nav .nav-links.is-open .nav-indicator {
    display: none;
  }

  .cinematic-hero {
    min-height: auto;
    padding: 28px 18px 54px;
  }

  .tactical-strip {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }

  .command-layout {
    padding-bottom: 24px;
  }

  .page-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    margin-top: 18px;
  }

  .subpage-nav {
    position: relative;
    top: auto;
  }

  .subpage-nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-hero {
    min-height: 210px;
    padding: 28px 20px;
  }

  .console-hero h1,
  .review-hero h1 {
    font-size: 36px;
  }

  .summary-grid,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .review-hero,
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-cluster {
    width: 100%;
    overflow-x: auto;
  }

  .operational-status {
    position: static;
    width: calc(100% - 24px);
    margin: 18px auto 0;
  }
}
