:root{
  --bg:#F5F7FA;
  --card:#FFFFFF;
  --panel:#EEF2F6;
  --text:#1F2937;
  --muted:#6B7280;
  --line:#E5E7EB;
  --shadow: 0 18px 55px rgba(15,23,42,0.10);
  --shadowSoft: 0 10px 30px rgba(15,23,42,0.06);
  --radius: 16px;
  --primary:#2563EB;

  --b10:#F59E0B;
  --b12:#FBBF24;
  --b15:#8B5CF6;
  --b17:#38BDF8;
  --b20:#2563EB;
  --b30:#14B8A6;
  --b40:#22C55E;
  --b80:#EF4444;
}

*{box-sizing:border-box}
html,body{height:100%}
html { -webkit-text-size-adjust: 100%; }

body{
  margin:0;
  font-family: var(--font-sans);
  color:var(--text);
  background:var(--bg);
}

.ambient{
  position:fixed; inset:0; pointer-events:none;
  background:
    radial-gradient(700px 380px at 72% 10%, rgba(56,189,248,0.18), transparent 70%),
    radial-gradient(620px 340px at 18% 14%, rgba(139,92,246,0.14), transparent 65%),
    radial-gradient(640px 420px at 40% 92%, rgba(20,184,166,0.12), transparent 70%);
  z-index:0;
}

.wrap{
  width:min(1180px, calc(100% - 40px));
  margin:0 auto;
  position:relative;
  z-index:1;
}

/* ===== Links (modern, no blue/purple) ===== */
a, a:visited{
  color: inherit;
  text-decoration: none;
}
a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
a:focus-visible{
  outline: 2px solid rgba(37,99,235,0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

.calllink{
  color: rgba(17,24,39,0.92);
  font-weight: 700;
}
.calllink:hover{ color: rgba(37,99,235,1); }
.calllink--sm{ font-weight: 650; }

/* Header */
.topbar{
  position:sticky; top:0; z-index:10;
  background: rgba(245,247,250,0.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(229,231,235,0.8);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color: inherit;
}
.mark{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg, rgba(56,189,248,0.9), rgba(37,99,235,0.9), rgba(20,184,166,0.9));
  box-shadow: var(--shadowSoft);
}
.brand__text strong{
  font-size:18px;
  letter-spacing:-0.02em;
}
.brand__text em{
  font-style:normal;
  color:var(--primary);
  font-weight:800;
  margin-left:4px;
}

.filters{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

select,
input[type="search"]{
  height:38px;
  border-radius:12px;
  border:1px solid rgba(229,231,235,0.95);
  background: rgba(255,255,255,0.75);
  padding: 0 12px;
  box-shadow: var(--shadowSoft);
  outline:none;
  font-family: var(--font-sans);
}

input[type="search"]{
  width: 220px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.actions{ display:flex; gap:10px; align-items:center; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:38px;
  padding:0 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:650;
  border:1px solid transparent;
  font-family: var(--font-sans);
}
.btn--primary{
  background:var(--primary);
  color:#fff;
  box-shadow: 0 10px 24px rgba(37,99,235,0.22);
}
.btn--ghost{
  background: rgba(255,255,255,0.75);
  border-color: rgba(229,231,235,0.95);
  color: rgba(31,41,55,0.9);
  box-shadow: var(--shadowSoft);
}
.btn--disabled{ opacity:.6; }

/* ✅ Make Submit DX Spot stand out (no HTML change needed) */
#submitBtn{
  background: var(--primary);
  color: #fff;
  border-color: rgba(37,99,235,0.35);
  padding: 0 16px;
  font-weight: 850;
  letter-spacing: -0.01em;
  box-shadow:
    0 12px 28px rgba(37,99,235,0.26),
    0 0 0 4px rgba(37,99,235,0.08);
  transition: transform .08s ease, box-shadow .14s ease, filter .14s ease;
}
#submitBtn:hover{
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px rgba(37,99,235,0.32),
    0 0 0 6px rgba(37,99,235,0.10);
}
#submitBtn:active{
  transform: translateY(0);
}
#submitBtn.btn--disabled,
#submitBtn[aria-disabled="true"]{
  opacity: 0.55;
  filter: grayscale(0.15);
  box-shadow: 0 10px 24px rgba(37,99,235,0.16);
}

/* Topbar user badge */
.userbadge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  height:38px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(229,231,235,0.95);
  background: rgba(255,255,255,0.75);
  box-shadow: var(--shadowSoft);
}
.userbadge__call{
  font-family: var(--font-mono);
  letter-spacing:-0.01em;
  font-weight:600;
}
.userbadge__state{
  font-family: var(--font-mono);
  letter-spacing:-0.01em;
  font-size:12px;
  padding:5px 8px;
  border-radius:999px;
  background:#EEF2FF;
  border:1px solid #E0E7FF;
  color:#1E40AF;
}
.userbadge__state.bad{
  background:#FEF2F2;
  border-color:#FEE2E2;
  color:#991B1B;
}

/* Layout */
.grid{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  padding: 18px 0 42px;
}

.sectionhead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
h1{
  margin:0;
  font-size:22px;
  letter-spacing:-0.02em;
  font-weight: 700;
}

.sub{
  display:flex;
  align-items:center;
  gap:8px;
  color: rgba(31,41,55,0.7);
  font-size:13px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  padding-top: 4px;
}
.dot{
  width:10px; height:10px;
  border-radius:999px;
  background: #9CA3AF;
  box-shadow:0 0 0 4px rgba(156,163,175,0.12);
}
.dot.ok{ background:#22C55E; box-shadow:0 0 0 4px rgba(34,197,94,0.14); }
.dot.bad{ background:#EF4444; box-shadow:0 0 0 4px rgba(239,68,68,0.14); }

.feed{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* =========================================================
   ✅ Quick Band Pills (single source of truth)
   ========================================================= */

.bandPills{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items:center;

  /* pills sit ABOVE table — not fused to it */
  margin: 12px 0 10px 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.pill{
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(229,231,235,0.95);
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadowSoft);
  cursor: pointer;

  display:inline-flex;
  align-items:center;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: rgba(17,24,39,0.86);
  font-family: var(--font-sans);
  font-size: 13px;

  transition: transform .08s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.pill::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--pillDot, var(--primary));
  /* fallback when color-mix unsupported */
  box-shadow: 0 0 0 6px rgba(37,99,235,0.14);
  display:inline-block;
  margin-right: 8px;
}

@supports (color: color-mix(in oklab, white 50%, black)){
  .pill::before{
    box-shadow: 0 0 0 6px color-mix(in oklab, var(--pillDot, var(--primary)) 14%, transparent);
  }
}

.pill:hover{
  background: rgba(255,255,255,0.88);
  transform: translateY(-1px);
}

.pill--active{
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.25);
  box-shadow:
    0 10px 30px rgba(15,23,42,0.06),
    0 0 0 4px rgba(37,99,235,0.06);
}

.pill--active::before{
  box-shadow: 0 0 0 7px rgba(37,99,235,0.18);
}
@supports (color: color-mix(in oklab, white 50%, black)){
  .pill--active::before{
    box-shadow: 0 0 0 7px color-mix(in oklab, var(--pillDot, var(--primary)) 18%, transparent);
  }
}

/* =========================================================
   ✅ TABLE FEED
   ========================================================= */

.spotsTableWrap{
  border: 1px solid rgba(229,231,235,0.92);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadowSoft);
  margin-top: 0;
}

table.spotsTable{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

table.spotsTable thead th{
  text-align:left;
  font-size: 12px;
  color: rgba(31,41,55,0.62);
  letter-spacing:-0.01em;
  font-weight: 900;
  padding: 12px 12px;
  background: rgba(255,255,255,0.86);
  border-bottom: 1px solid rgba(229,231,235,0.85);
  white-space: nowrap;
}

table.spotsTable tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(229,231,235,0.72);
  vertical-align: middle;
  color: rgba(17,24,39,0.88);
}

table.spotsTable tbody tr{
  background: rgba(255,255,255,0.78);
}

table.spotsTable tbody tr:nth-child(even){
  background: rgba(249,250,251,0.72);
}

table.spotsTable tbody tr:hover{
  filter: brightness(0.988);
}

.tmono{
  font-family: var(--font-mono);
  letter-spacing:-0.01em;
}

.callcell{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
  letter-spacing:-0.01em;
  min-width: 0;
}
.callcell--spotter{
  font-weight: 800;
}

.commentCell{
  color: rgba(17,24,39,0.82);
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bandPill{
  --pill: var(--b20);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(229,231,235,0.95);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.72));
  box-shadow: 0 6px 14px rgba(15,23,42,0.06);
  font-weight: 900;
  letter-spacing:-0.01em;
  white-space: nowrap;
  position: relative;
  color: rgba(17,24,39,0.88);
}
.bandPill::before{
  content:"";
  width:10px; height:10px;
  border-radius: 999px;
  background: var(--pill);
  /* fallback */
  box-shadow: 0 0 0 5px rgba(37,99,235,0.18);
  display:inline-block;
  margin-right: 8px;
}
@supports (color: color-mix(in oklab, white 50%, black)){
  .bandPill::before{
    box-shadow: 0 0 0 5px color-mix(in oklab, var(--pill) 18%, transparent);
  }
}

.flag{
  width:22px;
  height:16px;
  border-radius:6px;
  border:1px solid rgba(15,23,42,0.10);
  box-shadow: 0 6px 14px rgba(15,23,42,0.08);
  object-fit:cover;
  filter: saturate(0.92) contrast(0.96) brightness(1.03);
  transform: translateY(1px);
}
.flag--sm{
  width:22px;
  height:16px;
  border-radius:6px;
  transform: translateY(1px);
}

@media(max-width: 900px){
  .hideSm{ display:none; }
  .commentCell{ max-width: 260px; }
}
@media(max-width: 560px){
  .commentCell{ max-width: 180px; }
}

/* Panels */
.panel{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(229,231,235,0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadowSoft);
  padding: 14px;
  margin-bottom: 12px;
}

.panel__head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
}

.panel h2{
  margin:0;
  font-size:14px;
  letter-spacing:-0.01em;
  font-weight: 600;
}

.muted{
  color: rgba(31,41,55,0.55);
  font-size:12px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.bars{
  margin-top:10px;
  display:grid;
  gap:10px;
}

.bar{
  display:grid;
  grid-template-columns: 44px 1fr 34px;
  align-items:center;
  gap:10px;
  font-size:12px;
  color: rgba(31,41,55,0.72);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.track{
  height:10px;
  border-radius:999px;
  background: rgba(229,231,235,0.9);
  overflow:hidden;
}
.fill{ height:100%; border-radius:999px; }

.regions, .hot{
  margin-top:10px;
  display:grid;
  gap:10px;
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color: rgba(31,41,55,0.78);
  font-size:13px;
  font-family: var(--font-sans);
}

.row small{
  color: rgba(31,41,55,0.55);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  input[type="search"]{ width: 160px; }
}

/* ===== Modal Overlay ===== */
.overlay[hidden]{ display:none !important; }

.overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.55);
  backdrop-filter:blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:200;
}

.modal{
  width:min(600px,calc(100% - 40px));
  background:#ffffff;
  border-radius:20px;
  box-shadow:0 30px 80px rgba(0,0,0,0.25);
  padding:20px;
  animation:pop .18s ease;
}

@keyframes pop{
  from{ transform:scale(.975); opacity:.7; }
  to{ transform:scale(1); opacity:1; }
}

.modal__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}

.modal__close{
  border:0;
  background:none;
  font-size:20px;
  cursor:pointer;
}

.modal__body label{
  display:block;
  font-size:12px;
  color:#6B7280;
  margin:10px 0 6px;
}

.modal__body input,
.modal__body select{
  width:100%;
  height:40px;
  border-radius:12px;
  border:1px solid #E5E7EB;
  padding:0 12px;
  font-family: var(--font-sans);
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media(max-width:720px){
  .grid2{ grid-template-columns:1fr; }
}

/* ===== Spotters Online ===== */

.online {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onlinepill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(229,231,235,0.9);
  transition: background .15s ease;
}

.onlinepill:hover {
  background: rgba(255,255,255,0.85);
}

.onlinepill__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.15);
  flex: 0 0 auto;
}

.onlinepill__call {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.onlinepill__role {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.2);
  color: rgba(37,99,235,1);
  font-family: var(--font-mono);
}

/* Fresh/Flash (table rows) */
.spotRow.spot--fresh{
  outline: 2px solid rgba(37,99,235,0.12);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 9999px rgba(37,99,235,0.03);
}

.spotRow.spot--flash{
  animation: opdxSpotFlashRow 1.2s ease-out 1;
}

@keyframes opdxSpotFlashRow{
  0%{
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 9999px rgba(34,197,94,0.06);
  }
  100%{
    transform: translateY(0);
    box-shadow: inset 0 0 0 9999px rgba(37,99,235,0.03);
  }
}

/* =========================================================
   OpenPath DX — Call Tooltip (Floating Modern Bubble v3)
   ========================================================= */

.opdxTip{
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 20px);
  pointer-events: auto;
}

.opdxTip[hidden]{ display:none !important; }

.opdxTip.is-show{
  animation: opdxTipPop .16s cubic-bezier(.22,.9,.3,1);
}

@keyframes opdxTipPop{
  from{ transform: translateY(12px) scale(.95); opacity:0; }
  to{ transform: translateY(0) scale(1); opacity:1; }
}

.opdxTip__card{
  position: relative;
  border-radius: 20px;
  padding: 18px;

  /* Clean white (not grey) */
  background: #ffffff;

  /* Very subtle frost */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(229,231,235,0.9);

  /* Stronger floating depth */
  box-shadow:
    0 35px 80px rgba(15,23,42,0.30),
    0 12px 30px rgba(15,23,42,0.15),
    0 2px 6px rgba(15,23,42,0.08);
}

/* Subtle top highlight */
.opdxTip__card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:20px;
  pointer-events:none;
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.9) 0%,
      rgba(255,255,255,0.4) 35%,
      rgba(255,255,255,0.0) 70%
    );
  opacity:.6;
}

/* Bigger stronger callsign */
.opdxTip__call{
  font-family: var(--font-mono);
  font-weight: 950;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: #0f172a;
}

/* Chips */
.opdxTip__chip{
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.opdxTip__chip--muted{
  background: #f8fafc;
  color: #6b7280;
}

/* Beam box */
.opdxTip__beam{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

/* Buttons */
.opdxTip__btn{
  font-weight: 850;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #0f172a;
  transition: all .15s ease;
}

.opdxTip__btn:hover{
  background:#f3f4f6;
}

.opdxTip__btn--primary{
  background: #e8eef9;
  border-color: #c7d6f8;
}

/* === Tail (speech-bubble pointer) ======================== */
/* Put this right under .opdxTip__card{} */

.opdxTip__card::after{
  content:"";
  position:absolute;

  /* Tail position: top-left-ish (tweak this) */
  top: -8px;
  left: 42px;

  width: 16px;
  height: 16px;

  /* little rotated square = tail */
  transform: rotate(45deg);

  /* match the card */
  background: #ffffff;

  /* match the card border */
  border-left: 1px solid rgba(229,231,235,0.9);
  border-top: 1px solid rgba(229,231,235,0.9);

  /* soft depth */
  box-shadow: -6px -6px 14px rgba(15,23,42,0.06);

  /* keep it under content but above background */
  z-index: 0;
}

/* Make sure the tooltip content sits above the tail */
.opdxTip__top,
.opdxTip__meta,
.opdxTip__beam,
.opdxTip__actions{
  position: relative;
  z-index: 1;
}