:root {
  /* Huisstijl Sfeer & Sound (sfeersound.nl) */
  --bg: #f2f4f5;
  --card: #ffffff;
  --ink: #2b2c36;
  --dark: #2b2c36;
  --dark-alt: #363845;
  --muted: #6b748b;
  --line: #dce0e3;
  --accent: #ff2b58;
  --accent-ink: #ffffff;
  --gradient: linear-gradient(275deg, #f22cf2 0%, #1d55e0 100%);
  --ok: #2f8f5b;
  --warn: #b7791f;
  --bad: #c0392b;
  --radius: 14px;
  font-family: Poppins, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* bovenbalk */
.topbar { display: flex; align-items: center; gap: 1.5rem; padding: .7rem 1.5rem; background: var(--dark); color: #edf0f2; }
.topbar .brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 600; }
.topbar .brand img { height: 34px; display: block; }
.topbar .brand span { opacity: .7; font-size: .9rem; border-left: 1px solid #4e5663; padding-left: .7rem; }
.topbar nav a:hover { color: var(--accent); }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.topbar nav a { text-decoration: none; opacity: .8; }
.topbar nav a:hover { opacity: 1; }
.topbar form { margin: 0; }
.topbar button { background: none; border: 1px solid #ffffff44; color: #fff; }

main.wrap { max-width: 1180px; margin: 0 auto; padding: 1.5rem; }

/* kaarten en rasters */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem; }
.grid { display: grid; gap: 1.2rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat b { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* formulieren */
label { display: block; font-weight: 600; font-size: .9rem; margin: .7rem 0 .25rem; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; margin: .35rem 0; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
textarea { min-height: 70px; }
input[type=color] { width: 56px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
input[type=range] { width: 100%; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
button, .button {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink);
}
button.primary, .button.primary { background: var(--gradient); border-color: transparent; color: var(--accent-ink); }
button.primary:hover, .button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--bad); border-color: #e9c3be; }
button.link { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 500; text-decoration: underline; }
form.inline { display: inline; margin: 0; }
.actions { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* tabellen */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
td select { width: auto; }

/* labels */
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eee; }
.pill.actief, .pill.sent, .pill.on { background: #dff3e7; color: var(--ok); }
.pill.concept, .pill.pending, .pill.sending { background: #fbefd9; color: var(--warn); }
.pill.afgerond { background: #ece9e5; color: var(--muted); }
.pill.failed, .pill.off { background: #f8e0dd; color: var(--bad); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; letter-spacing: .2em; background: #ffe9ee; color: var(--accent); padding: .1rem .5rem; border-radius: 6px; }

/* meldingen */
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.flash.ok { background: #dff3e7; color: #1e5e3c; }
.flash.error { background: #f8e0dd; color: #8a2a20; }

/* tabs */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--accent); font-weight: 700; }

/* opnames */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.thumb { position: relative; background: #ddd; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .badge { position: absolute; top: 6px; left: 6px; background: #000a; color: #fff; font-size: .72rem; padding: .1rem .45rem; border-radius: 6px; }
.thumb.hidden { opacity: .35; }
.thumb .tools { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.thumb .tools button { padding: .2rem .5rem; font-size: .75rem; background: #fffe; }
.empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* voorbeeld startscherm en ringlamp */
.preview { border-radius: 16px; aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.preview img.logo { max-width: 40%; max-height: 30%; }
.preview .cta { padding: .7rem 1.4rem; border-radius: 999px; font-weight: 700; }
.ring { width: 180px; height: 180px; border-radius: 50%; margin: 1rem auto; border: 14px solid #fff; box-shadow: 0 0 40px #fff8; }
.asset { display: flex; gap: .8rem; align-items: center; margin: .3rem 0 .8rem; }
.asset img { width: 64px; height: 64px; object-fit: contain; background: #eee; border-radius: 8px; }
.qr { width: 140px; height: 140px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.login { max-width: 400px; margin: 8vh auto; }
.login-head { background: var(--dark); border-radius: var(--radius) var(--radius) 0 0; margin: -1.2rem -1.2rem 1.2rem; padding: 1.6rem; text-align: center; }
.login-head img { height: 64px; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; font-family: ui-monospace, Menlo, monospace; font-size: 1rem; background: #f2f4f5; padding: .8rem; border-radius: 8px; }
.secret { font-family: ui-monospace, Menlo, monospace; letter-spacing: .1em; word-break: break-all; background: #f2f4f5; padding: .3rem .5rem; border-radius: 6px; }
input.otp { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
code.url { word-break: break-all; font-size: .85rem; background: #f1eee9; padding: .15rem .35rem; border-radius: 4px; }

/* publieke pagina's */
body.public { background: var(--pub-bg, #111); color: var(--pub-text, #fff); }
.public header { text-align: center; padding: 2rem 1rem 1rem; }
.public header img { max-height: 90px; max-width: 60%; }
.public .gallery { max-width: 1200px; margin: 0 auto; padding: 1rem; columns: 3 260px; column-gap: .8rem; }
.public .gallery a { display: block; margin-bottom: .8rem; break-inside: avoid; border-radius: 10px; overflow: hidden; position: relative; }
.public .gallery img, .public .gallery video { width: 100%; display: block; }
.public .button.primary { background: var(--pub-accent, #ff2b58); border-color: var(--pub-accent, #ff2b58); color: #fff; }
.public .powered { text-align: center; padding: 2rem 1rem 1.5rem; opacity: .6; font-size: .8rem; }
.public .powered a { text-decoration: none; }
.public .powered img { height: 22px; vertical-align: middle; margin-left: .4rem; filter: drop-shadow(0 0 1px #0008); }
.public .center { text-align: center; padding: 1rem; }
.public .single { max-width: 720px; margin: 0 auto; padding: 1rem; text-align: center; }
.public .single img, .public .single video { max-width: 100%; max-height: 75vh; border-radius: 12px; }
.public input[type=password] { max-width: 280px; }
.live { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.live img, .live video { max-width: 100vw; max-height: 100vh; object-fit: contain; transition: opacity .8s; }
.live .tag { position: fixed; bottom: 2vh; left: 0; right: 0; text-align: center; color: #fffc; font-size: 2vh; }
