/* Live /live/ visual hierarchy only. Scoped to .cq-live. */
.cq-live .cq-dash {
  gap: 0;
}

.cq-live .navbar {
  box-shadow: none;
  border-bottom-color: #243547;
}

.cq-live .card {
  box-shadow: none;
  border-color: #2a3d50;
}

.cq-live #stats .stat-card {
  border-top-width: 1px;
  border-top-color: #3a5d72;
  background: #101b29 !important;
}

.cq-live #stats .stat-label,
.cq-live #stats .stat-sub {
  color: #93a6b8 !important;
}

.cq-live .call-filter-bar {
  box-shadow: none;
  background: #0e1824;
  border-color: #2a4054;
}

.cq-live .conn-nodes-wrap {
  box-shadow: none;
  background: #0c1622;
  border-color: #26384a;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: none !important;
  grid-template-rows: none !important;
  grid-auto-flow: row !important;
  align-items: start !important;
}
.cq-live .conn-map-core,
.cq-live .card-net-ysf,
.cq-live .card-net-bak,
.cq-live .card-net-asl,
.cq-live .card-net-urf,
.cq-live .conn-nodes-wrap > .card {
  grid-area: auto !important;
  height: auto !important;
  min-width: 0;
}
.cq-live .conn-map-core {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
}

.cq-live .conn-nodes-wrap .card {
  box-shadow: none;
}

.cq-live .cq-conn-tile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.35rem;
}
.cq-live .cq-conn-tile-grid > .card .card-header {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.5rem;
  min-height: 38px;
  height: 38px;
  padding: 0 0.4rem 0 0.3rem;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}
.cq-live .cq-conn-tile-grid > .card .card-header > .mode-sticker:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.2rem;
  min-width: 4.2rem;
  max-width: 4.2rem;
  height: 26px;
  padding: 0 0.35rem;
  font-size: 0.66rem;
  box-sizing: border-box;
}
.cq-live .cq-conn-tile-grid > .card .card-header .conn-card-copy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}
.cq-live .cq-conn-tile-grid > .card .card-header .conn-card-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  font-size: 0.78rem;
  text-align: left;
}
.cq-live .conn-card-counts {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}
.cq-live .conn-card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 26px;
  padding: 0 0.4rem;
  border-radius: 6px;
  background: #132536;
  border: 1px solid #3a5368;
  color: #f8fafc !important;
  font: 800 0.82rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}
.cq-live .cq-map-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.cq-live .cq-map-title .conn-card-count {
  justify-self: auto;
}
.cq-live .cq-conn-tile-grid > .card > .card-body {
  display: none;
}
@media (min-width: 700px) {
  .cq-live .cq-conn-tile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cq-live #traffic > .card {
  border-color: #3d5d73;
  height: auto;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.cq-live #traffic > .card > .card-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}
.cq-live #traffic .table-responsive {
  flex: 0 0 auto;
  border-color: #24384b;
  border-radius: 0;
  max-height: none;
  overflow: visible !important;
  overflow-x: hidden !important;
}

.cq-live #traffic > .card > .card-header,
.cq-live .conn-map-core .cq-map-header,
.cq-live .card-net-nodes > .card-header {
  min-height: 48px;
  height: 48px;
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.cq-live #traffic > .card > .card-header {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff !important;
  background: #152536 !important;
}
.cq-live #traffic > .card > .card-header .text-muted {
  color: #8ea0b3 !important;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cq-live #traffic #traffic-pages {
  padding: 0.45rem 0.85rem 0.2rem;
  margin: 0;
}
.cq-live #traffic .traffic-table {
  width: 100%;
  margin-bottom: 0;
  table-layout: fixed;
  font-size: 0.8rem;
}
.cq-live #traffic .traffic-table th:nth-child(1),
.cq-live #traffic .traffic-table td:nth-child(1) { width: 9%; }
.cq-live #traffic .traffic-table th:nth-child(2),
.cq-live #traffic .traffic-table td:nth-child(2) { width: 20%; overflow: visible; }
.cq-live #traffic .traffic-table th:nth-child(3),
.cq-live #traffic .traffic-table td:nth-child(3) { width: 22%; overflow: hidden; }
.cq-live #traffic .traffic-table th:nth-child(4),
.cq-live #traffic .traffic-table td:nth-child(4) { width: 13%; overflow: hidden; }
.cq-live #traffic .traffic-table th:nth-child(5),
.cq-live #traffic .traffic-table td:nth-child(5) { width: 16%; overflow: hidden; }
.cq-live #traffic .traffic-table th:nth-child(6),
.cq-live #traffic .traffic-table td:nth-child(6) { width: 11%; overflow: hidden; }
.cq-live #traffic .traffic-table th:nth-child(7),
.cq-live #traffic .traffic-table td:nth-child(7) { width: 9%; text-align: right; overflow: hidden; }
.cq-live #traffic .traffic-table th,
.cq-live #traffic .traffic-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.38rem 0.42rem;
  line-height: 1.2;
  vertical-align: middle;
}
.cq-live #traffic .traffic-call {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: visible;
  display: flex;
  align-items: center;
}
.cq-live #traffic .traffic-call-main {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: visible;
  flex-wrap: nowrap;
}
.cq-live #traffic .supporter-badge,
.cq-live #traffic .traffic-bridge-tag {
  flex-shrink: 0;
}
.cq-live #traffic .traffic-call-sub,
.cq-live #traffic .traffic-time-sub,
.cq-live #traffic .traffic-actions {
  display: none;
}
.cq-live #traffic .traffic-time {
  flex-direction: row;
  gap: 0.35rem;
}
.cq-live #traffic .traffic-call-link {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f8fafc !important;
}
.cq-live #traffic .traffic-via {
  font-weight: 800;
  color: #7dd3fc !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.cq-live #traffic .traffic-tg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}
.cq-live #traffic .traffic-tg .mode-sticker {
  flex-shrink: 0;
}
.cq-live #traffic .traffic-tg .traffic-pill {
  min-width: 0;
}
.cq-live #traffic .traffic-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
}
.cq-live #traffic .traffic-table th,
.cq-live #traffic .traffic-table td {
  text-align: left;
}
.cq-live #traffic .traffic-duration,
.cq-live #traffic .traffic-time,
.cq-live #traffic .traffic-time-main {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cq-live #traffic .traffic-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #172b3d !important;
}

.cq-live #traffic .traffic-table td {
  padding: 0.34rem 0.4rem;
  border-bottom-color: #223445;
  white-space: nowrap;
}

.cq-live .cq-system-status > .card-header {
  font-size: 0.92rem;
  font-weight: 750;
  color: #e8f1f6 !important;
}

.cq-live .cq-supporter-block .supporter-info-card {
  box-shadow: none;
  background: #10202e;
}

.cq-live #geek1 .card-header,
.cq-live #geek2 .card-header {
  font-size: 0.86rem;
  font-weight: 700;
  color: #d5e3ee !important;
}

.cq-live .cq-ops {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.cq-live .cq-ops > #live-path-bar { order: 1; }
.cq-live .cq-ops > .call-filter-bar { order: 2; }
.cq-live .cq-ops > #traffic { order: 3; }
.cq-live .cq-ops > .conn-nodes-wrap { order: 4; }

@media (min-width: 1200px) {
  .cq-live .cq-ops {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(400px, 0.95fr);
    grid-template-areas:
      "path path"
      "filter filter"
      "traffic conn";
    gap: 0.65rem 0.85rem;
    align-items: stretch;
  }
  .cq-live .cq-ops > #live-path-bar { grid-area: path; order: unset; }
  .cq-live .cq-ops > .call-filter-bar { grid-area: filter; order: unset; margin: 0; }
  .cq-live .cq-ops > #traffic {
    grid-area: traffic;
    order: unset;
    min-width: 0;
    height: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
  .cq-live .cq-ops > #traffic > .card {
    flex: 1 1 auto;
    height: 100%;
    min-height: 100%;
  }
  .cq-live .cq-ops > #traffic > .card > .card-body {
    flex: 1 1 auto;
    min-height: 0;
  }
  .cq-live .cq-ops > #traffic .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .cq-live .cq-ops > #traffic .traffic-table {
    flex: 1 1 auto;
    height: 100%;
  }
  .cq-live .cq-ops > #traffic #traffic-pages,
  .cq-live .cq-ops > #traffic .supporter-badge-key {
    flex: 0 0 auto;
  }
  .cq-live .cq-ops > .conn-nodes-wrap {
    grid-area: conn;
    order: unset;
    margin-top: 0;
    min-width: 0;
    height: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
    grid-template-rows: auto 1fr !important;
    align-items: stretch !important;
    gap: 0.45rem;
  }
  .cq-live .cq-ops .conn-map-core {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    grid-area: auto !important;
    height: auto !important;
  }
  .cq-live .cq-ops .conn-nodes-wrap > .card-net-nodes {
    grid-column: 1 / -1 !important;
    grid-area: auto !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .cq-live .cq-ops #qso-map {
    height: 240px;
    min-height: 240px;
  }
  .cq-live .cq-ops .cq-conn-tile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.32rem;
    padding: 0.4rem;
    flex: 1 1 auto;
    align-content: start;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card {
    grid-area: auto !important;
    height: auto !important;
    margin: 0;
    min-width: 0;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-body {
    display: none;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-header {
    cursor: pointer;
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    min-height: 38px;
    height: 38px;
    padding: 0 0.4rem 0 0.3rem;
    overflow: hidden;
    white-space: nowrap;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-header > .mode-sticker:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.2rem;
    min-width: 4.2rem;
    max-width: 4.2rem;
    height: 26px;
    padding: 0 0.35rem;
    font-size: 0.66rem;
    box-sizing: border-box;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-header .conn-card-copy {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    overflow: hidden;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-header .conn-card-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
    font-size: 0.78rem;
    text-align: left;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-header .allstar-type-icon {
    flex: 0 0 auto;
  }
  .cq-live .cq-ops .conn-nodes-wrap > .card-net-nodes > .card-header {
    height: auto;
    min-height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
}

.cq-live .conn-nodes-wrap .card:not(.card-net-map) .card-header {
  cursor: pointer;
}
.cq-live .mode-nodes {
  background: #334155;
  color: #fff !important;
}
.cq-live .cq-conn-show-all {
  appearance: none;
  flex-shrink: 0;
  border: 1px solid #67e8f9;
  border-radius: 6px;
  background: #155e75;
  color: #fff !important;
  font: 700 0.72rem/1.2 ui-sans-serif, system-ui, sans-serif;
  padding: 0.28rem 0.65rem;
  min-height: 30px;
  cursor: pointer;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cq-live .cq-conn-show-all:hover { background: #0e7490; }
.cq-live .cq-digital-card .stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.cq-live .cq-conn-bell {
  appearance: none;
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: auto;
  min-width: 42px;
  height: 24px;
  border: 1px solid #67e8f9;
  border-radius: 6px;
  background: #155e75;
  color: #fff !important;
  padding: 0 0.4rem;
  cursor: pointer;
}
.cq-live .cq-conn-bell:hover { background: #0e7490; }
.cq-live .cq-conn-bell:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.cq-live .cq-conn-bell-count {
  position: static;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #fff !important;
  font: 800 0.82rem/1 ui-sans-serif, system-ui, sans-serif;
  text-align: center;
}
.cq-conn-recent-clear {
  appearance: none;
  margin-left: auto;
  margin-right: 0.5rem;
  border: 1px solid #67e8f9;
  border-radius: 6px;
  background: #155e75;
  color: #fff !important;
  font: 700 0.75rem/1 ui-sans-serif, system-ui, sans-serif;
  padding: 0.28rem 0.7rem;
  min-height: 30px;
  cursor: pointer;
}
.cq-conn-recent-clear:hover { background: #0e7490; }
.cq-recent-empty {
  margin: 0;
  color: #b7c7d8;
}
.cq-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.cq-recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "call time" "server time";
  gap: 0.05rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border-left: 4px solid var(--popup-accent, #155e75);
  border-radius: 8px;
  background: #132536;
}
.cq-recent-call {
  grid-area: call;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1rem;
  color: #fff;
}
.cq-recent-server {
  grid-area: server;
  font-size: 0.78rem;
  color: #b7c7d8;
}
.cq-recent-time {
  grid-area: time;
  align-self: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: #9fb3c4;
  white-space: nowrap;
}
#conn-detail-body .conn-node-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-height: none;
  overflow: visible;
}
#conn-detail-body .cq-conn-all-block {
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #2a3d50;
}
#conn-detail-body .cq-conn-all-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
#conn-detail-body .cq-conn-all-block .card-header {
  background: transparent;
  border: 0;
  padding: 0 0 0.4rem;
  cursor: default;
}

.cq-live #hourly-graph {
  background: #0d1117;
}
.cq-live .cq-hour-row {
  gap: 8px;
  font-size: 0.75rem;
}
.cq-live .cq-hour-label {
  width: 30px;
  text-align: right;
  font-weight: 600;
  color: #e6edf3;
}
.cq-live .cq-hour-track {
  flex: 1;
  background: #21262d;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.cq-live .cq-hour-fill {
  height: 100%;
  transition: width 0.3s ease;
}
.cq-live .cq-hour-count {
  position: absolute;
  right: 4px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 0 2px #000;
  padding-left: 4px;
}

@media (max-width: 1199.98px) {
  .cq-live #traffic .traffic-table thead th {
    position: static;
  }
}

@media (max-width: 991.98px) {
  .cq-live #traffic > .card > .card-header {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .cq-live,
  .cq-live body {
    overflow-x: hidden;
  }
  .cq-live .container-fluid.mt-3 {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }
  .cq-live .call-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
  }
  .cq-live .call-filter-bar label {
    width: 100%;
    margin: 0;
  }
  .cq-live .call-filter-bar input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
  .cq-live #traffic .table-responsive {
    overflow: visible !important;
  }
  .cq-live #traffic .traffic-table {
    table-layout: auto;
    font-size: 0.78rem;
  }
  .cq-live #traffic .traffic-table thead {
    display: none;
  }
  .cq-live #traffic .traffic-table,
  .cq-live #traffic .traffic-table tbody {
    display: block;
    width: 100%;
  }
  .cq-live #traffic .traffic-table tr {
    display: grid;
    grid-template-columns: 3.1rem minmax(0, 1fr) auto;
    grid-template-areas:
      "st call time"
      "st from dur"
      "st tg radio";
    column-gap: 0.4rem;
    row-gap: 0.1rem;
    width: 100%;
    padding: 0.5rem 0.55rem;
    border-bottom: 1px solid #24384b;
    box-sizing: border-box;
  }
  html[data-theme="light"] .cq-live #traffic .traffic-table tr {
    border-bottom-color: #c5d3de;
  }
  .cq-live #traffic .traffic-table th,
  .cq-live #traffic .traffic-table td {
    width: auto !important;
    max-width: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 !important;
    border: 0 !important;
    display: block;
    text-align: left;
  }
  .cq-live #traffic .traffic-table td:nth-child(1) { grid-area: st; align-self: center; overflow: visible; white-space: normal; font-size: 0.68rem; line-height: 1.15; }
  .cq-live #traffic .traffic-table td:nth-child(2) { grid-area: call; overflow: visible; }
  .cq-live #traffic .traffic-table td:nth-child(3) { grid-area: from; }
  .cq-live #traffic .traffic-table td:nth-child(4) { grid-area: tg; }
  .cq-live #traffic .traffic-table td:nth-child(5) { grid-area: dur; text-align: right; }
  .cq-live #traffic .traffic-table td:nth-child(6) { grid-area: radio; text-align: right; }
  .cq-live #traffic .traffic-table td:nth-child(7) { grid-area: time; text-align: right; }
  .cq-live #traffic .traffic-call,
  .cq-live #traffic .traffic-call-main {
    flex-wrap: wrap;
    overflow: visible;
  }
  .cq-live #traffic .traffic-call-link {
    font-size: 0.92rem;
  }
  .cq-live #traffic .traffic-via,
  .cq-live #traffic .traffic-pill {
    max-width: 100%;
  }
  .cq-live #qso-map {
    height: 320px !important;
    min-height: 320px !important;
  }
  .cq-live .cq-ops .cq-conn-tile-grid > .card .card-header {
    min-height: 36px;
    height: auto;
    white-space: nowrap;
  }
  .cq-live .cq-digital-card .stat-label {
    font-size: 0.62rem;
  }
}
