:root {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #101b2d;
  --panel-strong: #162742;
  --text: #f4f7fb;
  --muted: #9aa8bb;
  --line: rgba(255, 255, 255, 0.11);
  --blue: #54a6ff;
  --green: #37d399;
  --amber: #f3b64b;
  --red: #ff6b7a;
  --violet: #a98bff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #08111f 0%, #0b1422 100%);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a2b44;
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
}

button:active {
  transform: translateY(1px);
}

button.danger {
  background: rgba(255, 107, 122, 0.16);
  border-color: rgba(255, 107, 122, 0.48);
}

button.warning {
  background: rgba(243, 182, 75, 0.16);
  border-color: rgba(243, 182, 75, 0.48);
}

button.ghost {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus {
  border-color: rgba(84, 166, 255, 0.72);
}

.app {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 10px;
}

.locked {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.locked-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 27, 45, 0.92);
  padding: 24px;
  text-align: center;
  overflow: hidden;
}

.locked-card h1 {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1.08;
}

.locked-card p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.decoy-code {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0;
}

.decoy-art {
  position: relative;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 24%, rgba(84, 166, 255, 0.28), transparent 18%),
    radial-gradient(circle at 72% 68%, rgba(55, 211, 153, 0.18), transparent 20%),
    linear-gradient(145deg, #0b1525, #172a46);
  overflow: hidden;
}

.planet {
  position: absolute;
  width: 78px;
  height: 78px;
  left: calc(50% - 39px);
  top: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #54a6ff 0%, #a98bff 52%, #ff6b7a 100%);
  box-shadow: 0 0 42px rgba(84, 166, 255, 0.38);
}

.ring {
  position: absolute;
  left: 50%;
  top: 94px;
  width: 176px;
  height: 30px;
  border: 2px solid rgba(244, 247, 251, 0.28);
  border-radius: 50%;
  transform: translateX(-50%) rotate(-12deg);
}

.ring-two {
  width: 132px;
  opacity: 0.44;
  transform: translateX(-50%) rotate(16deg);
}

.star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 247, 251, 0.9);
}

.star-one {
  left: 66px;
  top: 46px;
}

.star-two {
  right: 58px;
  top: 42px;
}

.star-three {
  right: 86px;
  bottom: 48px;
}

.app.locked-out {
  display: none;
}

.topbar,
.tabs,
.panel,
.output-panel {
  border: 1px solid var(--line);
  background: rgba(16, 27, 45, 0.9);
  border-radius: 8px;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 25px;
  line-height: 1;
}

h3 {
  margin-top: 3px;
  font-size: 19px;
  line-height: 1.16;
}

.status-pill,
.mini-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 6px;
}

.tab {
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.tab.active {
  background: var(--panel-strong);
  color: var(--text);
  border-color: rgba(84, 166, 255, 0.5);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 420px) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  align-items: start;
}

.controls {
  min-width: 0;
}

.panel {
  display: none;
  padding: 15px;
  min-width: 0;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.accent-rdp {
  box-shadow: inset 0 3px 0 var(--blue);
}

.accent-fail2ban {
  box-shadow: inset 0 3px 0 var(--red);
}

.accent-docker {
  box-shadow: inset 0 3px 0 var(--green);
}

.accent-openvpn {
  box-shadow: inset 0 3px 0 var(--amber);
}

.accent-server {
  box-shadow: inset 0 3px 0 var(--violet);
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.button-grid.two {
  margin-top: 8px;
}

.button-grid button:first-child:nth-last-child(1),
.button-grid button:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.output-panel {
  overflow: hidden;
  min-width: 0;
}

.output-head {
  min-height: 46px;
  padding: 8px 10px 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.output-actions {
  display: flex;
  gap: 6px;
}

pre {
  margin: 0;
  min-height: 286px;
  max-height: min(58vh, 540px);
  overflow: auto;
  padding: 12px;
  color: #dce7f5;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 16px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15243a;
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 10px 14px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .app {
    padding: 8px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar {
    min-height: 56px;
  }

  .tabs {
    overflow-x: auto;
    grid-template-columns: repeat(5, max-content);
  }

  .tab {
    min-width: 84px;
  }

  .panel {
    padding: 14px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  pre {
    min-height: 210px;
    max-height: 36vh;
  }
}
