﻿:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-soft: #111827;
  --text-primary: #f8fafc;
  --text-dim: #94a3b8;
  --border-card: 1px solid rgba(255, 255, 255, 0.08);
  --safe-color: #10b981;
  --warning-color: #facc15;
  --danger-color: #ef4444;
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-stack);
}

#app {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
}

.subtitle,
.note {
  margin: 0.35rem 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}





.btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1f2937;
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-size: 0.82rem;
}

.btn:hover { background: #374151; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn.small { padding: 0.45rem 0.65rem; font-size: 0.75rem; }

.meters-area {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.meter-card {
  width: 100%;
  max-width: 360px;
  min-width: 260px;
  background: var(--bg-card);
  border: var(--border-card);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meter-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.meter-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.peak-hold-label,
.status-text {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.status-text.error { color: #fca5a5; }
.status-text.ok { color: #86efac; }
.status-text.warn { color: #fde68a; }

.canvas-wrapper {
  position: relative;
  width: 80px;
  height: 300px;
  margin: 0.35rem 0 1rem;
}

.meter-canvas {
  width: 80px;
  height: 300px;
  border-radius: 0.8rem;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}

.scale-labels {
  position: absolute;
  left: calc(100% + 0.5rem);
  top: 0;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.readout {
  text-align: center;
  font-family: var(--font-mono);
}

.db-val {
  font-size: 1.25rem;
  font-weight: 700;
}

.db-val.clip-warn {
  color: var(--danger-color);
}

.card-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 700px) {
  #app { padding: 0.75rem; }
  .meter-card { max-width: none; }
}


.meter-unsupported {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.12);
  border-radius: 0.8rem;
}


/* FORCE red LYT button */
.meter-card .btn.small {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: none !important;
}
.meter-card .btn.small:hover {
  background: #b91c1c !important;
}
