:root {
  --bg-0: #040b1a;
  --bg-1: #07142b;
  --ink: #d6e4ff;
  --muted: #8aa4d6;
  --panel-bg: rgba(7, 17, 36, 0.58);
  --panel-border: rgba(135, 170, 235, 0.22);
  --ok: #5bc5a7;
  --warn: #7fa2d4;
  --bad: #d17893;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 20%, var(--bg-1), var(--bg-0));
  color: var(--ink);
  font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
}

#heroSvg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: clamp(18px, 3vw, 36px);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.plaqueStack {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.4vh, 24px);
}

.badbugsPlaque,
.quantmarketPlaque {
  pointer-events: auto;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  outline-offset: 6px;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.badbugsPlaque {
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.badbugsPlaque:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5));
}

.quantmarketPlaque {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.quantmarketPlaque:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}

.badbugsPlaque:focus,
.quantmarketPlaque:focus {
  outline: none;
}

.badbugsPlaque:focus-visible,
.quantmarketPlaque:focus-visible {
  outline: 3px solid rgba(127, 162, 212, 0.95);
  outline-offset: 8px;
}

.badbugsPlaque__svg {
  display: block;
  width: min(560px, 90vw);
  height: auto;
  max-height: min(268px, 38vh);
}

.quantmarketPlaque__svg {
  display: block;
  width: min(560px, 90vw);
  height: auto;
  max-height: min(268px, 38vh);
}

@media (max-height: 620px) {
  .plaqueStack {
    gap: clamp(8px, 1.6vh, 16px);
  }

  .badbugsPlaque__svg,
  .quantmarketPlaque__svg {
    max-height: min(200px, 30vh);
  }
}

.statusPanel {
  position: relative;
  z-index: 4;
  pointer-events: auto;
  min-width: min(300px, 100%);
  max-width: 340px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.authForm {
  margin-top: 2px;
  display: grid;
  gap: 8px;
}

.formTitle {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.authForm input {
  width: 100%;
  border: 1px solid rgba(129, 156, 206, 0.34);
  background: rgba(7, 19, 41, 0.65);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
}

.authForm select {
  width: 100%;
  border: 1px solid rgba(129, 156, 206, 0.34);
  background: rgba(7, 19, 41, 0.65);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
}

.passwordRow {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.passwordRow input {
  flex: 1;
  min-width: 0;
}

.togglePasswordBtn {
  flex-shrink: 0;
  min-width: 52px;
  border: 1px solid rgba(132, 165, 219, 0.35);
  background: rgba(35, 62, 109, 0.45);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.authForm input::placeholder {
  color: #7591c2;
}

.loginFieldsGroup {
  display: grid;
  gap: 8px;
}

.authForm.isAuthenticated .loginFieldsGroup {
  display: none;
}

.guestOnly {
  display: grid;
}

.authOnly {
  display: none;
}

.statusPanel.isAuthenticated .guestOnly {
  display: none;
}

.statusPanel.isAuthenticated .authOnly {
  display: block;
}

.settingsSection {
  border-top: 1px solid rgba(129, 156, 206, 0.25);
  margin-top: 4px;
  padding-top: 8px;
}

.settingsHeader {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.settingsHeader__profile {
  width: auto;
}

.settingsHeader__logout {
  width: auto;
  min-width: 7.25rem;
  border-color: rgba(209, 120, 147, 0.35);
  background: rgba(108, 49, 76, 0.22);
}

.settingsHeader__logout:hover {
  background: rgba(108, 49, 76, 0.32);
}

.fieldLabel {
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 17, 0.62);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 20;
}

.modalBackdrop.isOpen {
  display: flex;
}

.modalCard {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(7, 17, 36, 0.9);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 10px;
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.loginSubmitBtn,
.logoutWideBtn {
  border: 1px solid rgba(132, 165, 219, 0.35);
  background: rgba(35, 62, 109, 0.45);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 12px;
  text-transform: lowercase;
  width: 100%;
}

.openRegisterBtn {
  margin-top: 2px;
  border-color: rgba(232, 168, 32, 0.35);
  background: rgba(232, 168, 32, 0.12);
}

.openRegisterBtn:hover {
  background: rgba(232, 168, 32, 0.2);
}

@media (max-width: 520px) {
  .overlay {
    align-items: flex-start;
    padding: 12px;
  }

  .statusPanel {
    max-width: min(300px, calc(100vw - 24px));
    max-height: min(42vh, calc(100vh - 24px));
  }

  .plaqueStack {
    top: 54%;
  }

  .badbugsPlaque__svg,
  .quantmarketPlaque__svg {
    max-height: min(186px, 32vh);
  }
}

.statusItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.statusItem--account {
  margin-bottom: 2px;
}

.label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.badge.isOk {
  color: #e9fff8;
  background: rgba(42, 104, 93, 0.34);
  border-color: rgba(91, 197, 167, 0.36);
}

.badge.isWarn,
.badge.isUnknown {
  color: #e7f0ff;
  background: rgba(65, 88, 125, 0.35);
  border-color: rgba(127, 162, 212, 0.33);
}

.badge.isBad {
  color: #ffeef4;
  background: rgba(108, 49, 76, 0.38);
  border-color: rgba(209, 120, 147, 0.42);
}
