:root {
  --dc-backdrop: rgba(0,0,0,0.58);
  --dc-panel: rgba(9, 13, 22, 0.96);
  --dc-border: rgba(255,255,255,0.12);
  --dc-border-strong: rgba(255,255,255,0.18);
  --dc-good: #00ff6a;
  --dc-bad: #ff3b3b;
}

/* --- Header "Launch/Comms" icon (top-left) --- */

.brand {
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--dc-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.25));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 10px 24px rgba(0,0,0,0.45);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@keyframes paPulse {
  0%   { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 10px 24px rgba(0,0,0,0.45), 0 0 0 0 rgba(0,255,106,0.0); }
  45%  { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 10px 24px rgba(0,0,0,0.45), 0 0 0 10px rgba(0,255,106,0.12); }
  100% { box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 10px 24px rgba(0,0,0,0.45), 0 0 0 18px rgba(0,255,106,0.0); }
}

.brand-logo.is-connected {
  border-color: rgba(0,255,106,0.40);
  animation: paPulse 1.25s ease-in-out infinite;
}

/* --- DashComms modal --- */

.dc-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.dc-modal.open {
  display: block;
}

.dc-backdrop {
  position: absolute;
  inset: 0;
  background: var(--dc-backdrop);
}

.dc-panel {
  position: relative;
  width: min(980px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 40px));
  margin: 20px auto;
  border: 1px solid var(--dc-border);
  border-radius: 16px;
  background: var(--dc-panel);
  box-shadow: 0 30px 80px rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--dc-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0));
}

.dc-title {
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dc-sub {
  font-size: 12px;
  font-weight: 600;
}

.dc-close {
  border: 1px solid var(--dc-border);
  background: rgba(255,255,255,0.06);
  color: inherit;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
}

.dc-close:hover {
  border-color: var(--dc-border-strong);
  background: rgba(255,255,255,0.10);
}

.dc-body {
  padding: 14px 16px 16px;
  overflow: auto;
}

.dc-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.03);
}

.dc-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

.dc-dot.on {
  background: var(--dc-good);
  box-shadow: 0 0 0 3px rgba(0,255,106,0.12);
}

.dc-dot.off {
  background: var(--dc-bad);
  box-shadow: 0 0 0 3px rgba(255,59,59,0.12);
}

.dc-status-main {
  font-weight: 800;
}

.dc-status-sub {
  font-size: 12px;
  opacity: 0.85;
}

.dc-status-sub .sep {
  margin: 0 8px;
  opacity: 0.7;
}

.dc-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dc-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.dc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dc-section-title {
  font-weight: 800;
  margin-bottom: 8px;
}

.dc-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dc-list {
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  min-height: 120px;
  max-height: 240px;
  overflow: auto;
  background: rgba(0,0,0,0.18);
}

.dc-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
}

.dc-item:last-child {
  border-bottom: none;
}

.dc-item:hover {
  background: rgba(255,255,255,0.05);
}

.dc-item.selected {
  background: rgba(0,255,106,0.08);
  border-bottom-color: rgba(0,255,106,0.15);
}

.dc-item .mono {
  opacity: 0.9;
}

.dc-item .sub {
  font-size: 12px;
  opacity: 0.8;
}

.dc-import-result {
  margin-top: 8px;
  font-size: 12px;
}

.dc-log {
  margin-top: 12px;
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  max-height: 160px;
  overflow: auto;
  background: rgba(0,0,0,0.22);
  opacity: 0.92;
}

@media (max-width: 900px) {
  .dc-grid {
    grid-template-columns: 1fr;
  }
  .dc-split {
    grid-template-columns: 1fr;
  }
}
