﻿:root {
  --cb-blue: #009dff;
  --cb-blue-strong: #0287db;
  --cb-navy: #0a225e;
  --cb-ink: #011936;
  --cb-gray-0: #ffffff;
  --cb-gray-1: #f4f4f4;
  --cb-gray-2: #e0e6ef;
  --cb-gray-3: #bcc7d6;
  --cb-ok: #0c8a55;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cb-ink);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(10, 34, 94, 0.96) 0, rgba(10, 34, 94, 0.96) 5rem, transparent 5rem),
    linear-gradient(180deg, #f8fbff 0, var(--cb-gray-0) 20rem);
}

.shell {
  width: min(1240px, 96vw);
  margin: 1.2rem auto 2rem;
  display: grid;
  gap: 0.95rem;
}

.hero {
  padding: 0.45rem 0.35rem 0.25rem;
  color: #fff;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.9vw, 2.05rem);
  line-height: 1.15;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #a6d8ff;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color:#0a225e;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(10, 34, 94, 0.32);
  max-width: 70ch;
  /*background-color: #071747;*/
}

.panel {
  background: var(--cb-gray-0);
  border: 1px solid var(--cb-gray-2);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(1, 25, 54, 0.08);
}

.controls {
  padding: 1rem 1rem 0.85rem;
}

.controls label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3f546f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.query-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.6rem;
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--cb-gray-3);
  border-radius: 10px;
  font: inherit;
  font-size: 0.97rem;
  padding: 0.7rem 0.82rem;
  color: var(--cb-ink);
  background: #fff;
}

input[type="search"]:focus {
  outline: none;
  border-color: var(--cb-blue);
  box-shadow: 0 0 0 3px rgba(0, 157, 255, 0.18);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.68rem 0.98rem;
  color: #fff;
  background: var(--cb-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--cb-blue-strong);
}

.status,
.stats {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
}

.status {
  color: #425c7e;
}

.stats {
  color: var(--cb-ok);
}

.health {
  overflow: hidden;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--cb-gray-2);
}

.results-head h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--cb-navy);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #8acdfc;
  background: #e6f6ff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0a4f83;
}

.pill[data-mode="fallback"] {
  border-color: #aac0eb;
  background: #edf2ff;
  color: #193b79;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 0;
  margin: 0;
}

.health-item {
  padding: 0.7rem 0.85rem;
  border-right: 1px solid var(--cb-gray-2);
  border-bottom: 1px solid var(--cb-gray-2);
}

.health-item:nth-child(3n) {
  border-right: 0;
}

.health-item dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #59718f;
  font-weight: 700;
}

.health-item dd {
  margin: 0.28rem 0 0;
  font-size: 0.88rem;
  color: var(--cb-ink);
  font-weight: 600;
  word-break: break-word;
}

.results {
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
  max-height: min(66vh, 760px);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eff5fb;
  color: #2c4668;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.64rem;
  border-bottom: 1px solid #e6ecf4;
  vertical-align: top;
}

tbody tr:hover {
  background: #f7fbff;
}

td.path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  color: #2e4a6d;
  word-break: break-word;
}

td.actions {
  white-space: nowrap;
}

.link-button {
  display: inline-block;
  margin-right: 0.3rem;
  margin-bottom: 0.2rem;
  text-decoration: none;
  color: #fff;
  background: var(--cb-blue);
  border: 0;
  border-radius: 8px;
  font-size: 0.79rem;
  font-weight: 700;
  padding: 0.42rem 0.6rem;
}

.link-button:hover {
  background: var(--cb-blue-strong);
}

.link-button.copy {
  background: var(--cb-navy);
}

.link-button.copy:hover {
  background: #071747;
}

.empty {
  color: #5f7390;
  font-style: italic;
  padding: 1rem 0.64rem;
}

@media (max-width: 920px) {
  .query-row {
    grid-template-columns: 1fr;
  }

  .health-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .health-item:nth-child(3n) {
    border-right: 1px solid var(--cb-gray-2);
  }

  .health-item:nth-child(2n) {
    border-right: 0;
  }

  th:nth-child(3),
  td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 620px) {
  .shell {
    width: 97vw;
  }

  .health-grid {
    grid-template-columns: 1fr;
  }

  .health-item {
    border-right: 0;
  }

  .hero {
    padding-top: 0.3rem;
  }
}
