:root {
  --bg: #f4f3fa; --card: #fff; --ink: #1b1730; --muted: #6b6785; --line: #e6e3f1;
  --p1: #6d28d9; --p2: #ec4899; --side: #17132b; --ok: #0f9d6b; --warn: #b45309; --bad: #dc2626;
  --fb: #1877f2; --ig: #e1306c; --tt: #111;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif; color: var(--ink); background: var(--bg); display: flex; min-height: 100vh; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
h3 { margin: 0; font-size: 16px; }
p { margin: 0; }
code { background: #f0edfa; padding: 1px 5px; border-radius: 5px; font-size: 13px; }

.side { width: 232px; flex: none; background: var(--side); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; padding: 0 8px; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--p1), var(--p2)); font-size: 17px; }
#nav { display: flex; flex-direction: column; gap: 4px; }
#nav button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #c9c4e3; font-weight: 500; }
#nav button i { font-style: normal; width: 22px; text-align: center; }
#nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
#nav button.active { background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; }
#nav button:focus-visible { outline: 2px solid #fff; }
#nav em { margin-left: auto; font-style: normal; font-size: 12px; background: rgba(255,255,255,.2); border-radius: 99px; padding: 0 8px; }
#nav em:empty { display: none; }
.side-foot { margin-top: auto; font-size: 12.5px; color: #a8a2c8; display: flex; flex-direction: column; gap: 2px; padding: 12px; background: rgba(255,255,255,.06); border-radius: 12px; }
.side-foot b { color: #fff; font-size: 14px; }
.side-foot .lan { color: #f0abfc; word-break: break-all; }

main { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1280px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.top p { color: var(--muted); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px rgba(27,23,48,.04); }
.sticky { position: sticky; top: 20px; }
.step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--p1), var(--p2)); }

label { display: block; font-size: 13px; font-weight: 600; color: #45405f; margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #d8d4e8; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--p1); outline-offset: -1px; border-color: var(--p1); }
input[type=color] { padding: 3px; height: 42px; }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; accent-color: var(--p1); }
.check { display: flex; align-items: center; font-weight: 500; }
.check small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hint { color: var(--muted); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 10px 15px; border: 1px solid #d8d4e8; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn:hover { border-color: var(--p1); color: var(--p1); }
.btn:focus-visible { outline: 2px solid var(--p1); outline-offset: 2px; }
.btn.primary { background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent:hover { color: #fff; filter: brightness(1.3); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn.big { width: 100%; padding: 13px; font-size: 15px; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.link { all: unset; cursor: pointer; color: var(--p1); font-size: 13px; font-weight: 600; margin-top: 10px; display: inline-block; }
.badge { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 99px; white-space: nowrap; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
h2 .badge { margin-left: auto; }

.visual { background: #efedf7; border-radius: 14px; overflow: hidden; margin: 0 auto 14px; display: grid; place-items: center; width: 100%; max-width: 380px; aspect-ratio: 1; }
.visual.portrait { aspect-ratio: 4 / 5; max-width: 340px; }
.visual.story { aspect-ratio: 9 / 16; max-width: 250px; }
.visual img, .visual video, .visual canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { color: var(--muted); font-size: 13px; display: grid; place-items: center; width: 100%; min-height: 150px; background: #efedf7; }
.busy { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--p1); margin-bottom: 12px; }
.bar { flex-basis: 100%; height: 5px; background: #ebe7f7; border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--p1), var(--p2)); }
.spin { width: 15px; height: 15px; border: 2px solid #d9cdf7; border-top-color: var(--p1); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 6px; background: #f1eff9; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tabs button { all: unset; cursor: pointer; flex: 1; text-align: center; padding: 8px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(27,23,48,.12); }
.tabs button.active.facebook { color: var(--fb); }
.tabs button.active.instagram { color: var(--ig); }
.tabs button:focus-visible { outline: 2px solid var(--p1); }
.preview { background: #f1eff9; border-radius: 14px; padding: 16px; margin-bottom: 14px; display: grid; place-items: center; }
.channels { display: flex; gap: 16px; flex-wrap: wrap; margin: 2px 0 12px; }
.channels label { margin: 0; }
.schedule { display: flex; gap: 8px; margin-top: 10px; }
.schedule input { margin: 0; flex: 1; min-width: 0; }
.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.big-ico { font-size: 40px; margin-bottom: 8px; }

/* Voorbeelden per platform */
.mock { width: 100%; max-width: 340px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e4e6eb; font-size: 14px; color: #050505; text-align: left; }
.mock img, .mock video { width: 100%; display: block; max-height: 420px; object-fit: cover; background: #000; }
.m-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.m-head small { display: block; color: #65676b; font-size: 12px; }
.m-head .dots { margin-left: auto; color: #65676b; letter-spacing: 1px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.ring { padding: 2px; border-radius: 50%; background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); display: grid; }
.ring .avatar { border: 2px solid #fff; width: 34px; height: 34px; }
.m-text { padding: 2px 12px 11px; white-space: normal; word-break: break-word; }
.ig .m-text { padding-top: 0; }
.tag { color: #0064d1; }
.m-bar { display: flex; justify-content: space-around; border-top: 1px solid #e4e6eb; padding: 9px; color: #65676b; font-weight: 600; font-size: 13px; }
.m-icons { display: flex; gap: 14px; padding: 9px 12px 6px; font-size: 20px; }
.m-icons .right { margin-left: auto; }
.mock.tt { position: relative; aspect-ratio: 9 / 16; max-width: 250px; background: #000; color: #fff; border: 0; border-radius: 18px; }
.mock.tt .tt-media { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.mock.tt .ph { position: absolute; inset: 0; background: #1c1c1c; color: #999; }
.tt-side { position: absolute; right: 8px; bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 13px; font-size: 21px; text-shadow: 0 1px 3px #000; }
.tt-side .avatar { border: 2px solid #fff; }
.tt-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 54px 12px 12px; font-size: 12.5px; line-height: 1.35; background: linear-gradient(transparent, rgba(0,0,0,.78)); pointer-events: none; }
.tt-cap .tag { color: #fff; font-weight: 700; }
.tt-cap small { display: block; margin-top: 6px; opacity: .9; }
.tt-cap [data-cap] { max-height: 84px; overflow: hidden; }

/* Postoverzicht */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 16 / 10; background: #111; cursor: pointer; }
.thumb { overflow: hidden; }
.thumb img, .thumb video, .thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.vid { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.post-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body small { color: var(--muted); }
.post-body p { color: #45405f; font-size: 13.5px; }
.post-body .btns { margin-top: auto; padding-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #f1eff9; color: #45405f; text-decoration: none; }
.chip.published { background: #dcfce7; color: #166534; }
.chip.scheduled { background: #e0e7ff; color: #3730a3; }
.chip.failed { background: #fee2e2; color: #991b1b; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--tt); flex: none; }
.dot.facebook { background: var(--fb); }
.dot.instagram { background: var(--ig); }
.url { font: 600 17px/1.4 Consolas, monospace; background: #f1eff9; color: var(--p1); padding: 12px 14px; border-radius: 10px; margin-top: 10px; word-break: break-all; user-select: all; }

.modal { position: fixed; inset: 0; background: rgba(23,19,43,.6); display: grid; place-items: center; padding: 20px; z-index: 20; overflow: auto; }
.modal[hidden], .toast[hidden] { display: none; }
.modal { grid-template-columns: minmax(0, 1fr); }
.sheet { background: var(--bg); border-radius: 20px; padding: 24px; max-width: 1120px; width: 100%; min-width: 0; margin: 0 auto; position: relative; }
.sheet .close { all: unset; cursor: pointer; position: absolute; right: 18px; top: 12px; font-size: 28px; color: var(--muted); }
.mocks { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.mocks > div { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 340px; max-width: 100%; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; z-index: 30; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); }

@media (max-width: 980px) {
  body { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; overflow-x: auto; }
  .logo span:last-child, .side-foot, #nav button span { display: none; }
  #nav { flex-direction: row; }
  main { padding: 18px 16px 50px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .row3 { grid-template-columns: 1fr; }
}

.check.ref { margin: 12px 0 0; }
.btns + .hint, .check.ref + .hint { margin-top: 10px; }
