/* Geluidsmeter (/klas/geluidsmeter/) – bouwt voort op site.css en klas.css */
.breadcrumb { padding-top: 22px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb + .page-head { padding-top: 14px; }

.meter-visual { gap: 18px; overflow: hidden; }
.meter-visual[data-zone="green"] { background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(34,197,94,.16)); }
.meter-visual[data-zone="orange"] { background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(245,158,11,.2)); }
.meter-visual[data-zone="red"] { background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(239,68,68,.24)); }
.meter-stage { width: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 40px); }

/* stoplicht */
.traffic-light { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 16px 14px; border-radius: 28px; background: linear-gradient(180deg, #334155, #1e293b); box-shadow: 0 16px 34px rgba(15,23,42,.28), inset 0 2px 0 rgba(255,255,255,.08); }
.lamp { width: clamp(54px, 7vw, 78px); aspect-ratio: 1; border-radius: 50%; background: #475569; box-shadow: inset 0 -6px 12px rgba(0,0,0,.35); transition: background .25s, box-shadow .25s; }
[data-zone="red"] .lamp-red { background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444 55%, #b91c1c); box-shadow: 0 0 30px rgba(239,68,68,.75); }
[data-zone="orange"] .lamp-orange { background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 55%, #b45309); box-shadow: 0 0 30px rgba(245,158,11,.75); }
[data-zone="green"] .lamp-green { background: radial-gradient(circle at 35% 30%, #bbf7d0, #22c55e 55%, #15803d); box-shadow: 0 0 30px rgba(34,197,94,.7); }

/* meterbalk */
.meter-bar { position: relative; flex: none; width: clamp(46px, 6vw, 64px); height: clamp(240px, 36vh, 300px); border-radius: 999px; background: linear-gradient(0deg, rgba(34,197,94,.18), rgba(245,158,11,.18) 60%, rgba(239,68,68,.2)); border: 3px solid #fff; box-shadow: 0 10px 26px rgba(72,48,122,.12); }
.meter-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-radius: 999px; background: linear-gradient(0deg, #22c55e, #84cc16 40%, #f59e0b 65%, #ef4444); background-size: 100% clamp(240px, 36vh, 300px); background-position: bottom; transition: height .08s linear; }
.meter-mark { position: absolute; left: -10px; right: -10px; height: 0; border-top: 3px dashed; }
.mark-orange { border-color: rgba(245,158,11,.9); }
.mark-red { border-color: #ef4444; }
.mark-red b { position: absolute; left: calc(100% + 6px); top: -11px; padding: 1px 8px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .72rem; font-weight: 900; }

/* uitlezing */
.meter-readout { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.meter-face { font-size: clamp(4rem, 9vw, 6rem); line-height: 1; }
.meter-message { font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.05; color: var(--text); }
[data-zone="green"] .meter-message { color: #15803d; }
[data-zone="orange"] .meter-message { color: #b45309; }
[data-zone="red"] .meter-message { color: #dc2626; }
.meter-level { font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: 2rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-level small { font-size: 1rem; }
.meter-history { width: 100%; height: 56px; border-radius: 12px; background: rgba(255,255,255,.6); }

/* startscherm over de meter */
.meter-overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px; text-align: center; background: rgba(255,255,255,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.meter-overlay[hidden] { display: none; }
.meter-overlay p { max-width: 420px; margin: 0 0 14px; color: var(--muted); line-height: 1.6; }
.meter-overlay .overlay-title { margin: 0 0 6px; color: var(--text); font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: 1.8rem; font-weight: 700; }
.overlay-error { margin-top: 14px !important; padding: 12px 16px; border-radius: 14px; background: #fee2e2; color: #991b1b !important; font-weight: 700; }

/* bediening */
.field-title { margin: 0 0 10px; font-weight: 800; }
.mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; color: var(--accent); background: var(--accent-soft); border: 2px solid transparent; border-radius: 16px; font-weight: 900; cursor: pointer; line-height: 1.1; }
.mode span { font-size: 1.4rem; }
.mode:hover, .mode.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.range-field { display: flex; flex-direction: column; gap: 8px; font-weight: 800; }
.range-field > span { display: flex; justify-content: space-between; gap: 10px; }
.range-field b { color: var(--accent); }
.range-field input { width: 100%; accent-color: var(--accent); height: 28px; }
.check-field { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.check-field input { width: 22px; height: 22px; accent-color: var(--accent); }
.meter-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meter-stats div { padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); text-align: center; }
.meter-stats span { display: block; color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.meter-stats strong { font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-size: 1.8rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* schermvullend: meter groot voor het digibord */
.meter-app:fullscreen .klas-layout { flex: 1; }
.meter-app:fullscreen .meter-bar { height: 58vh; }
.meter-app:fullscreen .meter-fill { background-size: 100% 58vh; }
.meter-app:fullscreen .lamp { width: 15vh; }
.meter-app:fullscreen .meter-face { font-size: 11rem; }
.meter-app:fullscreen .meter-message { font-size: 3.4rem; }

@media (max-width: 760px) {
  .meter-stage { gap: 14px; }
  .meter-bar { height: 220px; }
  .meter-fill { background-size: 100% 220px; }
  .lamp { width: 46px; }
  .meter-face { font-size: 3.4rem; }
  .meter-message { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .meter-fill, .lamp { transition: none !important; }
}
