body {
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 30px;
  color: #222;
}

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}

.card {
  max-width: 1040px;
  margin: auto;
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}

.card.narrow {
  max-width: 420px;
  width: 100%;
}

h1 {
  margin-top: 0;
  font-size: 26px;
}

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

.topbar h1 {
  margin-bottom: 0;
}

.inline {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}

label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  color: #444;
}

label.check input {
  width: auto;
}

input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #ccd2d8;
  border-radius: 8px;
  font-size: 15px;
}

input:disabled {
  background: #f2f4f6;
  color: #777;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

button {
  margin-top: 16px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}

button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

button.ghost {
  background: #eef2f5;
  color: #333;
}

button.small {
  margin-top: 0;
  padding: 7px 12px;
  font-size: 13px;
}

button.danger {
  background: #b42318;
}

button.go {
  background: #087f23;
}

.msg {
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef2f5;
  white-space: pre-wrap;
}

.msg.ok {
  background: #e7f5ea;
  color: #087f23;
}

.msg.bad {
  background: #fdeceb;
  color: #b42318;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #e7eaee;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  background: #f7f8fa;
}

th.right, td.right {
  text-align: right;
}

td input {
  padding: 7px 9px;
  font-size: 14px;
}

td.port-cell {
  width: 110px;
}

td.address-cell {
  width: 250px;
}

.name {
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.on {
  background: #e7f5ea;
  color: #087f23;
}

.badge.off {
  background: #fdeceb;
  color: #b42318;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.row-msg {
  margin-top: 6px;
  font-size: 12px;
  text-align: right;
}

.row-msg.ok {
  color: #087f23;
}

.row-msg.bad {
  color: #b42318;
}

.note {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
  line-height: 1.5;
}

code {
  background: #f2f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

pre.hash {
  background: #111;
  color: #eee;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 650px) {
  .grid {
    grid-template-columns: 1fr;
  }
  body {
    padding: 14px;
  }
}
