/* Net logger (/logger/) and public net monitor (/monitor/). Loaded after site.css; uses its colors. */
[hidden] { display: none !important; }

.bh-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; margin: 0 0 24px; }
.bh-panel h2 { margin: 0 0 14px; font: 600 1.3rem/1.2 var(--head-font); }

.bh-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.bh-fields label { min-width: 150px; flex: 0 1 200px; }
input.caps { text-transform: uppercase; }

.bh-msg { min-height: 1.5em; margin: 0 0 16px; }
.bh-msg.error { min-height: 0; }
.bh-msg:empty { margin: 0; }

.btn-small { min-height: 34px; padding: 0 12px; font-size: .95rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--panel-alt); filter: none; }
.btn-danger { background: transparent; color: #ff9d94; border: 1px solid #6b2e2a; }
.btn-danger:hover { background: #3a1c1c; filter: none; }
.btn:disabled { opacity: .6; cursor: default; filter: none; }

/* Open nets list (logger) */
.bh-netlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bh-net { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 8px; }
.bh-net.is-current { border-color: var(--signal); }
.bh-net div { display: flex; flex-direction: column; }
.bh-net strong { font: 600 1.15rem/1.3 var(--head-font); }

/* Check-in tables */
.bh-tablewrap { overflow-x: auto; }
.bh-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bh-table th, .bh-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bh-table th { color: var(--muted); font-weight: 500; font-size: .9rem; }
.bh-table tbody tr:nth-child(even) { background: var(--panel-alt); }
.bh-table .bh-call { font-weight: 700; letter-spacing: .03em; }
.bh-table tr.is-done td { color: var(--muted); }
.bh-table tr.is-done .bh-call { color: var(--text); }
#checkins { overflow-x: auto; }

/* Public monitor */
.mon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.mon-net h2 { margin-bottom: 4px; }
.mon-net .muted { margin: 0 0 12px; }
.mon-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #4cd964;
  margin-right: 8px; vertical-align: middle; }
.mon-status-done { color: var(--muted); }
.mon-status-wait { color: var(--signal); font-weight: 600; }

/* Shared bits for the Net Manager, history, map and home pages */
.bh-ok { background: #16321f; color: #bff0c8; border: 1px solid #2c6a3c; padding: 10px 12px; border-radius: 8px; }
.bh-panel-head { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bh-panel-head h2 { margin: 0; }
.bh-inline-form { margin: 0; }
.bh-inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.bh-inline select { min-height: 36px; padding: 4px 8px; }
.bh-h3 { margin: 18px 0 8px; font: 600 1.1rem/1.2 var(--head-font); }
.bh-hint { font-weight: 400; font-size: .85rem; }
.bh-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bh-chips li { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; background: var(--panel-alt);
  border: 1px solid var(--line); border-radius: 8px; }
.bh-chips form { margin: 0; }
.bh-edit { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.bh-edit-head { flex-basis: 100%; width: 100%; max-width: none !important; margin: 0; font-size: 1.15rem; }
.bh-edit label.bh-num { flex: 0 1 240px; }
.bh-call { font-weight: 700; letter-spacing: .03em; }
.bh-top { margin: 0; padding: 0; list-style: none; columns: 3 220px; column-gap: 24px; counter-reset: top; }
.bh-top li { break-inside: avoid; display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line);
  counter-increment: top; }
.bh-top li::before { content: counter(top) "."; color: var(--muted); min-width: 1.6em; }
.bh-top-n { margin-left: auto; font-variant-numeric: tabular-nums; }
.bh-pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 16px; }
.bh-pager a { display: inline-flex; align-items: center; text-decoration: none; }

/* Map */
.map-main { max-width: 1300px; }
.bh-map { height: min(70vh, 640px); border: 1px solid var(--line); border-radius: 10px; }
.map-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.map-legend li { display: flex; align-items: center; gap: 8px; }
.map-swatch { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.8); }
.leaflet-container { font-family: "Barlow", system-ui, sans-serif; background: var(--bg); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content h3 { margin: 0 0 6px; font: 600 1.1rem/1.2 var(--head-font); }
.leaflet-popup-content ul { margin: 6px 0 0; padding-left: 1.1rem; }
.leaflet-popup-content .c { font-weight: 700; color: var(--signal); }
.leaflet-popup-content .v { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }

/* Home */
.bh-hero { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; margin-bottom: 28px; }
.bh-hero h1 { margin-bottom: 10px; }
.bh-hero p { margin: 0 0 14px; }
.bh-logo { width: 160px; height: auto; border-radius: 50%; background: #000; box-shadow: 0 0 0 1px var(--line); }
.btn { text-decoration: none; display: inline-flex; align-items: center; }
.bh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.bh-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.bh-card strong { font: 600 1.2rem/1.2 var(--head-font); color: var(--signal); }
.bh-card:hover, .bh-card:focus-visible { border-color: var(--signal); }

/* Home: banner and welcome */
.bh-banner { background: #000; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  display: flex; justify-content: center; margin: -8px 0 28px; }
.bh-banner img { display: block; width: 100%; max-width: 720px; height: auto; }
.bh-welcome { max-width: 760px; margin: 0 0 28px; }
.bh-welcome h1 { margin: 0 0 14px; }
.bh-sub { display: block; margin-top: 6px; font: 500 clamp(1.1rem, 2.4vw, 1.4rem)/1.2 var(--head-font); color: var(--muted);
  letter-spacing: .02em; }
.bh-welcome p { margin: 0 0 14px; font-size: 1.08rem; }
.bh-motto { padding: 12px 16px; border-left: 3px solid var(--signal); background: var(--panel); border-radius: 0 8px 8px 0; }
