:root{
  /* Exacte logo-kleuren (zelfde als Transport Planner) */
  --brand-dark: #0F6B5A;
  --brand-mid:  #2E8B57;
  --brand-light:#8DC63F;
  --brand-soft: #A8D5BA;

  --bg: #f4f7f6;
  --panel: #ffffff;
  --border: #e3ece8;
  --text: #0f172a;
  --muted: #5f7d75;

  --shadow: 0 14px 28px rgba(15,107,90,.10);
  --radius: 16px;
}
*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 520px at 10% -10%, rgba(141,198,63,.16), transparent 60%),
    radial-gradient(1000px 420px at 90% -5%, rgba(46,139,87,.12), transparent 60%),
    var(--bg);
  color:var(--text);
}

/* Header */
.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  padding:14px 18px; background:#fff; border-bottom:2px solid var(--brand-soft);
}
.brand{ display:flex; align-items:center; gap:14px; }
.brand-logo{ height:46px; width:auto; display:block; }
.title{ font-size:22px; font-weight:900; color:var(--brand-dark); letter-spacing:.2px; }
.subtitle{ font-size:13px; color:var(--muted); margin-top:2px; }
.topbar-right{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.whoami{
  font-size:12px; color:var(--muted); padding:6px 10px;
  border:1px solid rgba(46,139,87,.18); border-radius:999px; background:rgba(168,213,186,.12);
}

main{ max-width:1040px; margin:0 auto; padding:20px 18px 40px; }
h2{ font-size:18px; margin:22px 0 4px; color:var(--brand-dark); font-weight:900; }
section:first-child h2{ margin-top:6px; }
.muted{ color:var(--muted); font-size:13px; }
.section-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:22px 0 4px; }
.section-head h2{ margin:0; }

/* Knoppen (zelfde als Transport Planner) */
button{ font-family:inherit; }
.btn, button{
  height:38px; padding:0 16px; border-radius:12px;
  border:1px solid rgba(46,139,87,.30); background:#fff; cursor:pointer;
  font-weight:900; color:var(--brand-dark);
  transition: background .12s ease, transform .06s ease, border-color .12s ease;
}
.btn:hover, button:hover{ background:rgba(168,213,186,.18); border-color:rgba(46,139,87,.45); }
.btn:active, button:active{ transform:translateY(1px); }
.btn.primary{ background:linear-gradient(135deg, var(--brand-light), var(--brand-mid)); border:none; color:#fff; }
.btn.primary:hover{ background:linear-gradient(135deg, var(--brand-mid), var(--brand-dark)); }
.btn.danger{ border-color:rgba(239,68,68,.55); color:#b91c1c; background:#fff; }
.btn.danger:hover{ background:#fff1f2; border-color:rgba(239,68,68,.8); }

/* Kaarten */
.cards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(310px, 1fr)); gap:16px; }
.card{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 18px; box-shadow:var(--shadow);
}
.card.pending{ border-color:rgba(217,119,6,.5); }
.card h3{ margin:0 0 .3rem; font-size:16px; color:var(--text); display:flex; align-items:center; gap:.5rem; }
.dot{ width:9px; height:9px; border-radius:50%; background:#94a3b8; flex:none; }
.dot.online{ background:#22c55e; box-shadow:0 0 8px rgba(34,197,94,.5); }
.dot.offline{ background:#94a3b8; }
.code{
  font-family:ui-monospace, Menlo, monospace; font-size:1.5rem; letter-spacing:.15em;
  background:rgba(168,213,186,.16); color:var(--brand-dark); padding:.35rem .7rem;
  border-radius:10px; display:inline-block; margin:.3rem 0; font-weight:800;
}
/* Live schermpreview */
.thumb{ margin:.6rem 0; border-radius:10px; overflow:hidden; background:#0b1220; border:1px solid var(--border); display:grid; place-items:center; }
.thumb.landscape{ aspect-ratio:16/9; width:100%; }
.thumb.portrait{ aspect-ratio:9/16; max-width:160px; }
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb-empty{ color:#64748b; font-size:.8rem; padding:1.4rem; }

.url{ font-size:.82rem; color:var(--brand-mid); word-break:break-all; font-weight:700; }
.row{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.8rem; }
.meta{ font-size:.72rem; color:var(--muted); margin-top:.6rem; }

/* Inline invoervelden op kaarten */
.card input[type="text"], .card input[type="url"]{
  width:100%; margin-top:.5rem; padding:8px 12px; border-radius:12px;
  border:1px solid rgba(46,139,87,.28); background:#fff; color:var(--brand-dark);
  font-weight:800; font-size:.9rem; outline:none;
}
.card input:focus{ border-color:rgba(46,139,87,.6); box-shadow:0 0 0 4px rgba(46,139,87,.12); }

/* Mededeling-badges */
.badge{ display:inline-block; font-size:.7rem; font-weight:800; padding:.15rem .55rem; border-radius:999px; text-transform:uppercase; letter-spacing:.03em; }
.badge.info{ background:#e0f2fe; color:#075985; }
.badge.warning{ background:#fef3c7; color:#92400e; }
.badge.success{ background:#dcfce7; color:#166534; }
.badge.urgent{ background:#fee2e2; color:#991b1b; }
.badge.live{ background:#dcfce7; color:#166534; border:1px solid #22c55e; }
.badge.off{ background:#f1f5f9; color:#64748b; }
.ann-title{ font-size:16px; font-weight:800; margin:.5rem 0 .2rem; color:var(--text); }
.ann-body{ font-size:.85rem; color:var(--muted); max-height:3.6em; overflow:hidden; }

/* Modal */
.modal-overlay{
  position:fixed; inset:0; background:rgba(15,23,42,.45); display:grid; place-items:center;
  z-index:50; padding:1rem;
}
.modal-overlay[hidden]{ display:none; }   /* fix: overschrijft display:grid bij hidden */
.modal{
  background:#fff; border:1px solid var(--border); border-radius:18px; padding:1.4rem;
  width:min(560px, 96vw); max-height:90vh; overflow:auto; box-shadow:var(--shadow); color:var(--text);
}
.modal h3{ margin:0 0 1rem; color:var(--brand-dark); font-weight:900; }
.field{ margin-bottom:.9rem; }
.field label{ display:block; font-size:12px; font-weight:700; color:var(--muted); margin-bottom:.3rem; }
.field input, .field textarea, .field select{
  width:100%; padding:9px 12px; border-radius:12px; border:1px solid rgba(46,139,87,.28);
  background:#fff; color:var(--brand-dark); font-weight:700; font-size:.9rem; font-family:inherit; outline:none;
}
.field input:focus, .field textarea:focus, .field select:focus{ border-color:rgba(46,139,87,.6); box-shadow:0 0 0 4px rgba(46,139,87,.12); }
.field textarea{ min-height:90px; resize:vertical; }
.field-row{ display:flex; gap:.8rem; }
.field-row .field{ flex:1; }
.modal-actions{ display:flex; justify-content:flex-end; gap:.6rem; margin-top:1rem; }

/* Targeting (schermkeuze) */
.chk{ display:flex; align-items:center; gap:.5rem; font-size:.9rem; font-weight:600; color:var(--text); margin:.3rem 0; cursor:pointer; }
.chk input{ width:auto; }
.tgt-list{
  margin-top:.5rem; padding:.6rem .8rem; border:1px solid var(--border); border-radius:12px;
  background:#f8faf9; max-height:180px; overflow:auto;
}

/* Playlist-editor */
.pl-item{
  display:flex; align-items:center; gap:.6rem; padding:.5rem .6rem; margin-bottom:.5rem;
  background:#f8faf9; border:1px solid var(--border); border-radius:12px;
}
.pl-item .grow{ flex:1; min-width:0; }
.pl-item .pl-label{ font-size:.85rem; font-weight:700; word-break:break-all; }
.pl-item .pl-sub{ font-size:.72rem; color:var(--muted); }
.pl-item input.dur{ width:70px; margin:0; padding:6px 8px; }
.pl-item button{ height:34px; padding:0 .6rem; }
.pl-empty{ color:var(--muted); font-size:.85rem; padding:.5rem 0; }
.inline-add{ display:flex; gap:.5rem; margin-top:.8rem; flex-wrap:wrap; align-items:end; }
.inline-add .field{ margin:0; }
