.fit-cover {
  object-fit: cover;
}

/* ANSI SGR styling for log messages - see ansiToHtml() in devicevpnweb.js.
   Foreground colours are darkened from the terminal defaults so they stay
   readable on the white table background. */
.ansi-bold { font-weight: 600; }
.ansi-dim { opacity: 0.65; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }
.ansi-strike { text-decoration: line-through; }

.ansi-fg-0 { color: #2b2b2b; }
.ansi-fg-1 { color: #c62828; }
.ansi-fg-2 { color: #2e7d32; }
.ansi-fg-3 { color: #a06a00; }
.ansi-fg-4 { color: #1565c0; }
.ansi-fg-5 { color: #8e24aa; }
.ansi-fg-6 { color: #00838f; }
.ansi-fg-7 { color: #6c757d; }
.ansi-fg-8 { color: #7f7f7f; }
.ansi-fg-9 { color: #e53935; }
.ansi-fg-10 { color: #388e3c; }
.ansi-fg-11 { color: #b8860b; }
.ansi-fg-12 { color: #1e88e5; }
.ansi-fg-13 { color: #ab47bc; }
.ansi-fg-14 { color: #0097a7; }
.ansi-fg-15 { color: #adb5bd; }

/* backgrounds are tinted so any foreground colour stays legible on top */
.ansi-bg-0, .ansi-bg-8 { background-color: #dee2e6; }
.ansi-bg-1, .ansi-bg-9 { background-color: #f8d7da; }
.ansi-bg-2, .ansi-bg-10 { background-color: #d1e7dd; }
.ansi-bg-3, .ansi-bg-11 { background-color: #fff3cd; }
.ansi-bg-4, .ansi-bg-12 { background-color: #cfe2ff; }
.ansi-bg-5, .ansi-bg-13 { background-color: #f3d9fa; }
.ansi-bg-6, .ansi-bg-14 { background-color: #cff4fc; }
.ansi-bg-7, .ansi-bg-15 { background-color: #f8f9fa; }

/* clickable log rows + the structured-message detail modal */
table.logstable-clickable tbody tr { cursor: pointer; }

.log-detail-heading {
  margin-top: 1rem;
  font-family: var(--bs-font-monospace);
  font-size: 0.85rem;
  color: #6c757d;
}

.log-detail-table {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.log-detail-table th {
  font-family: var(--bs-font-monospace);
  font-weight: 600;
  white-space: nowrap;
  width: 1%;
}

.log-detail-table thead th { width: auto; }

.log-detail-table td {
  font-family: var(--bs-font-monospace);
  word-break: break-word;
}

.log-detail-msg { white-space: pre-wrap; }

.log-detail-raw { margin-top: 1rem; }

.log-detail-raw pre {
  font-size: 0.75rem;
  max-height: 20rem;
  overflow: auto;
  background: #f8f9fa;
  padding: 0.5rem;
}