body { font: clamp(14px, 1.5vw, 18px)/1.6 monospace; margin: 0; padding: 86px 30px 30px; background: #111; color: #eee; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
h1 { text-align: center; margin: 0; font-size: 1.55em; }
.logo { display: block; margin: 0 auto 20px; height: 4em; }
body > a:last-of-type { margin-top: auto; }
body > a:last-of-type .logo { margin-top: 40px; margin-bottom: 0; }
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 30px;
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #333;
}
.navbar-brand { display: flex; align-items: flex-start; gap: 2px; color: #eee; text-decoration: none; }
.navbar-brand sup { font-size: 0.6em; line-height: 1; opacity: 0.7; }
.navbar-logo { display: block; height: 2em; }
.navbar-item { color: #888; text-decoration: none; }
.navbar-item:hover { color: #eee; }
.navbar-item[aria-current] { color: #eee; text-decoration: underline; text-underline-offset: 6px; }
#navbar-login { margin-left: auto; }
#navbar-logout {
  margin-left: auto;
  padding: 4px 12px;
  background: #333;
  border: 1px solid #444;
  color: #eee;
  cursor: pointer;
  font: inherit;
  font-size: 0.8em;
}
#navbar-logout:hover { background: #444; }
.grid { display: flex; flex-wrap: wrap; gap: 48px; justify-content: center; max-width: 1048px; margin: 0 auto; }
.last-updated { text-align: center; color: #666; font-size: 0.8em; margin-bottom: 24px; }
.last-updated.stale { color: #fa0; }
.last-updated.invisible { visibility: hidden; }
#log-show, #log-controls, #logs { max-width: 1048px; width: 100%; margin: 0 auto; }
.hidden { display: none !important; }
.column { border: 1px solid #444; padding: 20px 30px; width: 500px; box-sizing: border-box; }
.column-full { width: 1048px; }
.column h2 { margin: 0 0 15px; font-size: 1.22em; }
.column h3 { margin: 15px 0 10px; font-size: 1.11em; color: #888; border-top: 1px solid #444; padding-top: 15px; text-align: center; }
.row { display: flex; justify-content: space-between; }
.row a { color: inherit; text-decoration: none; }
.row a:hover { text-decoration: underline; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table th, table td { padding: 12px 16px; text-align: left; }
.compact-table th, .compact-table td { padding: 4px 16px; }
.routing-table td.sub { padding-left: 2em; }
.routing-table td:last-child { text-align: right; }
.tab-bar { display: flex; gap: 8px; margin-bottom: 15px; }
#log-show,
#log-controls button,
.tab-bar button {
  background: #333;
  border: 1px solid #444;
  color: #eee;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
}
#log-show:hover, #log-controls button:hover, .tab-bar button:hover { background: #444; }
.tab-bar button.active { background: #14231a; border-color: #4a3; color: #6d8; }
table th { color: #888; font-weight: normal; border-bottom: 1px solid #444; }
table td { border-bottom: 1px solid #333; }
table tbody tr:hover { background: #1a1a1a; }
.connected { color: #4f4; }
.pending { color: #fa0; }
.in_mempool { color: #fd5; }
.disconnected { color: #f44; }
.fulfilled { color: #6cf; }
.cancelled { color: #888; }
.expired { color: #f84; }
.flagged { color: #f44; font-weight: bold; }
.cleared { color: #888; }
.order-link { color: inherit; text-decoration: none; display: block; margin: -12px -16px; padding: 12px 16px; }
.order-progress {
  position: relative;
  width: 120px;
  height: 18px;
  overflow: hidden;
  background: #111;
  border: 1px solid #444;
}
.order-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: #2d7a2d;
}
.order-progress-label {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 18px;
  text-align: center;
  color: #eee;
  font-size: 0.9em;
}
.copyable { cursor: pointer; position: relative; z-index: 10; }
.copyable:hover { background: #222; outline: 1px solid #444; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.8); }
.copyable.copied[data-full]:hover::after { content: 'Copied!'; }
.copyable[data-full]:hover::after {
  content: attr(data-full);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #111;
  border: 1px solid #444;
  padding: 4px 8px;
  white-space: nowrap;
  color: #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 1000;
  pointer-events: none;
}
#txids a { color: #eee; text-decoration: none; }
#txids a:hover { text-decoration: underline; }
.wrapper { width: fit-content; margin: 0 auto; }
#log-show {
  display: block;
  margin: 40px auto 0;
}
#log-controls {
  margin-top: 40px;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
#log-controls input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #444;
  color: #eee;
  padding: 8px 12px;
  font: inherit;
}
#log-controls input::placeholder { color: #666; }
#log-controls button.paused { background: #4a3; color: #111; }
#log-level-controls { position: relative; }
#log-level-options { position: absolute; bottom: 100%; left: 0; display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
#log-controls + #logs { margin-top: 0; }
#logs {
  height: 450px;
  overflow-y: auto;
  overflow-x: auto;
  background: #0a0a0a;
  border: 1px solid #444;
  padding: 10px;
  font-size: 0.67em;
  box-sizing: border-box;
  scrollbar-color: #444 #1a1a1a;
}
#logs div { white-space: pre; }
#logs::-webkit-scrollbar { width: 8px; }
#logs::-webkit-scrollbar-track { background: #1a1a1a; }
#logs::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
#logs::-webkit-scrollbar-thumb:hover { background: #666; }
.log-error { color: #f55; }
.log-warn { color: #fa0; }
.log-info { color: #4f4; }
.log-debug { color: #88f; }
.filter-table table th { white-space: nowrap; }
.filter-table table td { vertical-align: middle; white-space: nowrap; }
.filter-table .table-scroll { overflow-x: auto; }
.filter-table .table-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  font-size: 0.9em;
}
.filter-table .table-toolbar.two-filters {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
}
.filter-table .toolbar-search { grid-column: 1 / -1; }
.filter-table .table-toolbar label,
.filter-table .toolbar-label { color: #888; font-size: 1em; }
.filter-table .table-toolbar input[type="search"],
.filter-table .table-toolbar select,
.filter-table .multi-select-toggle,
.filter-table .table-reset {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 7px 10px;
  height: 38px;
  background: #111;
  border: 1px solid #444;
  color: #eee;
  font: inherit;
}
.filter-table .multi-select { position: relative; }
.filter-table .multi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}
.filter-table .multi-select-toggle::after { content: "\25BE"; color: #888; margin-left: 10px; }
.filter-table .multi-select-options {
  position: absolute;
  z-index: 1500;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  background: #111;
  border: 1px solid #444;
}
.filter-table .multi-select-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 4px;
  color: #eee;
  cursor: pointer;
}
.filter-table .multi-select-options label:hover { background: #222; }
.filter-table .table-reset {
  width: auto;
  min-width: 80px;
  margin-top: 0;
  background: #333;
  cursor: pointer;
}
.filter-table .table-reset:hover { background: #444; }
.filter-table th[data-sort] { cursor: pointer; user-select: none; }
.filter-table th[data-sort]:hover { color: #eee; }
.filter-table th[data-sort]::after {
  content: "";
  display: inline-block;
  width: 1em;
  margin-left: 4px;
  color: #ccc;
}
.filter-table th[data-sort].sort-asc::after { content: "\25B2"; }
.filter-table th[data-sort].sort-desc::after { content: "\25BC"; }
.filter-table th.col-flex,
.filter-table td.col-flex {
  width: 100%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-table .table-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: #888;
  font-size: inherit;
}
.filter-table .table-pagination button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font: inherit;
  padding: 4px 8px;
}
.filter-table .table-pagination button:hover { color: #eee; }
.filter-table .table-pagination button:disabled { opacity: 0.3; cursor: not-allowed; }
.filter-table .page-status { text-align: center; }
@media (max-width: 1140px) {
  body { padding: 76px 20px 20px; }
  .navbar { padding: 10px 20px; gap: 16px; }
  .wrapper { width: auto; }
  .columns { flex-direction: column; gap: 30px; align-items: center; }
  .grid { gap: 30px; }
  .column { width: 100%; max-width: 500px; }
  .column-full { width: 100%; max-width: 500px; }
  #log-controls { flex-wrap: wrap; }
  #log-controls input { width: 100%; flex: none; margin-bottom: 10px; }
  #log-controls button { flex: 1; }
  .filter-table .table-toolbar { grid-template-columns: 1fr; }
  .filter-table table { font-size: 0.75em; }
}
@media (max-width: 560px) {
  body { padding: 66px 10px 10px; }
  .navbar { padding: 8px 12px; gap: 12px; }
  .column { padding: 15px 20px; }
}
.git-info { text-align: center; font-size: 0.7em; color: #666; margin-top: 20px; }
.git-info a { color: inherit; text-decoration: none; }
.git-info a:hover { text-decoration: underline; }
