:root {
  --black: #000;
  --white: #fff;
  --green: #57c086;
  --red: #ea2f2f;
  --line: #333;
  --muted: #888;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  font-family: Consolas, "Courier New", monospace;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.loginScreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 28px;
  text-align: center;
}

.loginPanel {
  width: min(390px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 22px;
  background: var(--black);
}

.loginPanel input,
.loginPanel button {
  width: 100%;
  min-height: 48px;
  font-size: 20px;
}

.loginPanel .statusLine {
  margin: 2px 0 0;
  text-align: left;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.sectionTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.sectionTop.second {
  margin-top: 36px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

h1 {
  margin: 0;
  color: var(--green);
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.9;
  letter-spacing: 0;
}

h2,
h3 {
  color: var(--green);
  margin: 0;
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 24px;
  margin: 18px 0 12px;
}

button,
input {
  min-height: 40px;
  border: 0;
  padding: 8px 14px;
  font: inherit;
}

button,
.uploadButton {
  background: var(--white);
  color: var(--black);
  cursor: pointer;
}

button:hover,
.uploadButton:hover {
  transform: scale(1.03);
}

button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

input {
  background: #111;
  color: var(--white);
  border: 1px solid var(--line);
}

.uploadButton {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 14px;
}

.uploadButton input {
  display: none;
}

.statusLine {
  min-height: 24px;
  color: var(--green);
  margin: 18px 0 0;
}

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

.targetPanel,
.summary article,
.card,
.ruleSets article,
.connectionList article {
  border: 1px solid var(--line);
  padding: 16px;
}

.infoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(335px, 1fr));
  gap: 0 24px;
  border: 1px solid var(--line);
  padding: 10px 14px;
}

.metric {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.4fr);
  align-items: start;
  gap: 14px;
  padding: 5px 0;
  border-bottom: 1px solid #222;
}

.metric span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.metric span:first-child {
  color: #aaa;
}

.metric span:last-child {
  text-align: right;
}

.summary,
.clients,
.ruleSets,
.connectionList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 14px;
}

.summary strong,
.card strong,
.ruleSets strong,
.connectionList strong {
  display: block;
  color: var(--green);
  font-size: 22px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.summary article > span {
  font-size: 34px;
}

.card {
  border-color: var(--white);
  cursor: pointer;
}

.detail {
  border-top: 1px solid var(--green);
  padding-top: 18px;
}

.detail h2 {
  color: var(--green);
  font-size: 32px;
  margin: 0 0 14px;
}

.detailTop {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.logsPanel {
  border: 1px solid var(--line);
  margin-top: 18px;
  padding: 14px;
}

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

.logsHeader h3 {
  margin: 0;
}

.logsHeader button {
  flex: 0 0 auto;
}

.logsPanel summary {
  color: var(--green);
  cursor: pointer;
  margin-bottom: 12px;
}

.logBlock {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

.empty {
  color: var(--muted);
  font-size: 22px;
}

.empty.small {
  font-size: 16px;
}

.contextMenu {
  position: fixed;
  z-index: 20;
  border: 1px solid var(--white);
  background: var(--black);
  padding: 8px;
}

.contextMenu button {
  min-width: 160px;
}

.hidden {
  display: none;
}
