/* ============================================
   PLACEHOLDER26 — SDR Monitor
   Design: Dark industrial / utilitarian
   Font: Share Tech Mono + Barlow Light
   ============================================ */

:root {
  --bg:         #080a0c;
  --bg-panel:   #0d1117;
  --bg-hover:   #111820;
  --border:     #1c2a38;
  --accent:     #00d4ff;
  --accent-dim: #007a94;
  --danger:     #ff3b3b;
  --ok:         #00ff8c;
  --warn:       #ffaa00;
  --text:       #c8d8e8;
  --text-dim:   #4a6070;
  --text-label: #2a4055;
  --mono:       'Share Tech Mono', monospace;
  --sans:       'Barlow', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* ── HEADER ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.logo {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.logo-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.3em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.3s;
}

.status-dot.ok    { background: var(--ok);   box-shadow: 0 0 6px var(--ok); }
.status-dot.error { background: var(--danger); }
.status-dot.warn  { background: var(--warn); animation: blink 1s step-end infinite; }

.freq-display {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 160px;
  text-align: right;
}

/* ── LAYOUT ── */
body {
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 16px;
}

/* ── WATERFALL ── */
.waterfall-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  background: #000;
  position: relative;
  min-height: 0;
}

.section-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-label);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}

#fft-canvas {
  width: 100%;
  height: 80px;
  display: block;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

#waterfall-canvas {
  width: 100%;
  flex: 1;
  display: block;
  min-height: 0;
}

/* ── CONTROLS ── */
.controls-section {
  display: grid;
  grid-template-columns: 1fr 220px 200px;
  gap: 16px;
  flex-shrink: 0;
}

.panel {
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.panel-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-label);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}

/* PMR Channels */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  padding: 12px;
  background: var(--border);
}

.ch-btn {
  background: var(--bg);
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  padding: 10px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, color 0.15s;
  outline: none;
}

.ch-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.ch-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.ch-btn .ch-num {
  font-size: 13px;
  font-weight: bold;
}

.ch-btn .ch-freq {
  font-size: 8px;
  letter-spacing: 0.05em;
  color: inherit;
  opacity: 0.7;
}

/* Audio */
.audio-controls {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 10px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.btn-audio svg {
  width: 14px;
  height: 14px;
}

.btn-audio:hover:not(:disabled) {
  background: var(--accent-dim);
  color: #fff;
}

.btn-audio:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-dim);
}

.btn-audio.playing {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vol-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  width: 28px;
}

.vol-value {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  width: 24px;
  text-align: right;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 2px;
  background: var(--border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent);
  cursor: pointer;
}

.audio-meter {
  height: 3px;
  background: var(--border);
  margin: 0 12px 12px;
}

.meter-bar {
  height: 100%;
  width: 0%;
  background: var(--ok);
  transition: width 0.05s;
}

/* Info grid */
.info-grid {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
}

.info-row span:first-child {
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.info-row span:last-child {
  color: var(--text);
}

.rx-badge {
  background: var(--danger);
  color: #fff !important;
  font-size: 8px !important;
  padding: 2px 6px;
  letter-spacing: 0.15em;
}

/* ── FOOTER ── */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 6px 24px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-label);
  letter-spacing: 0.15em;
  flex-shrink: 0;
  background: var(--bg-panel);
}

/* ── ANIMATIONS ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── NO SIGNAL OVERLAY ── */
.no-signal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 12, 0.85);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3em;
  pointer-events: none;
  z-index: 10;
}
