:root {
  color-scheme: dark;
  font-family: Segoe UI, Arial, sans-serif;
  background: #11151b;
  color: #f4f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #11151b;
}

button,
.file-button {
  border: 1px solid #d8d5cc;
  background: #e6e2d8;
  color: #11151b;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
.file-button:hover {
  background: #f2eee5;
}

.shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

p {
  color: #aab4c3;
  margin-top: 5px;
}

.server-pill {
  min-width: 180px;
  padding: 10px 12px;
  background: #202632;
  border-left: 4px solid #8be9fd;
  font-weight: 700;
}

.login-panel {
  width: min(420px, 100%);
  margin: 80px auto;
  background: #171d26;
  border: 1px solid #303948;
  padding: 22px;
}

.login-panel form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #d8dee9;
  font-weight: 700;
}

input {
  min-height: 38px;
  border: 1px solid #3c4655;
  background: #0f1319;
  color: #fff;
  padding: 7px 9px;
}

.message {
  color: #ffb86b;
  min-height: 24px;
  margin-top: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.file-button input {
  display: none;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

progress {
  width: 100%;
  height: 24px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metrics div {
  background: #202632;
  padding: 14px;
  text-align: center;
}

.metrics span {
  display: block;
  color: #aab4c3;
  font-size: 13px;
  margin-bottom: 6px;
}

.metrics strong {
  font-size: 24px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  min-height: 520px;
}

.table-wrap {
  overflow: auto;
  background: #0f1319;
  border: 1px solid #303948;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #e6e2d8;
  color: #11151b;
  text-align: left;
  padding: 8px;
}

td {
  border-bottom: 1px solid #202632;
  padding: 7px 8px;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

tr.working td {
  color: #71f79f;
}

tr.dead td {
  color: #ff6b6b;
}

tr.bad-url td {
  color: #ffb86b;
}

tr.reachable td {
  color: #8be9fd;
}

.side {
  background: #171d26;
  border: 1px solid #303948;
  padding: 14px;
  min-width: 0;
}

pre {
  height: 470px;
  overflow: auto;
  background: #0f1319;
  border: 1px solid #303948;
  color: #d8dee9;
  padding: 12px;
  white-space: pre-wrap;
  font: 13px Consolas, monospace;
}

@media (max-width: 980px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

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

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