/* =========================================================
   Vrolijke Koster – beheerpaneel
   (bouwt voort op /style.css)
   ========================================================= */
body.admin { background: var(--bg); min-height: 100vh; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- Inloggen ---------- */
.login {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}
.login::before {
  content: ""; position: absolute; inset: -20px; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(47, 107, 255, .35), transparent 60%),
    linear-gradient(180deg, rgba(5, 7, 15, .7), rgba(5, 7, 15, .92) 70%, var(--bg)),
    url('/img/background.jpeg') center 30% / cover no-repeat;
  filter: blur(3px);
}
.login-card {
  width: min(420px, 100%); text-align: center; padding: 36px 30px 28px;
  background: rgba(10, 15, 31, .72); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  animation: pop .5s var(--ease);
}
.login-card img {
  width: 104px; height: 104px; border-radius: 50%; margin: -4px auto 16px;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, .35), 0 0 50px var(--blue-glow);
}
.login-card h1 { font-size: 1.9rem; margin-bottom: 4px; }
.login-card h1 .script { font-size: 1.1em; }
.login-card > p { margin-bottom: 4px; }
.login-card .field { text-align: left; margin-top: 22px; margin-bottom: 16px; }
.pw-wrap { position: relative; }
input[type="password"], .pw-wrap input {
  width: 100%; min-height: 52px; padding: 12px 52px 12px 46px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border); border-radius: 14px;
  color: #fff; font-size: 16px; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.pw-wrap input:focus { outline: none; border-color: var(--blue-2); background: rgba(47, 107, 255, .1); box-shadow: 0 0 0 4px rgba(47, 107, 255, .2); }
.pw-icon { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 42px; height: 42px;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; display: grid; place-items: center;
}
.pw-toggle:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.login-msg:empty { display: none; }
.login-msg {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 12px 14px; margin: 0 0 16px; border-radius: 12px; font-size: .92rem; line-height: 1.45;
  background: rgba(255, 93, 115, .1); border: 1px solid rgba(255, 93, 115, .35); color: #ffb3bf;
}
.login-msg::before { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #ff7b8d; margin-top: 1px; }
.login-msg code { background: rgba(255, 255, 255, .1); padding: 1px 6px; border-radius: 6px; font-size: .85em; color: #fff; }
.back-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 20px; color: var(--muted); text-decoration: none; font-size: .92rem; }
.back-link:hover { color: #fff; }
.login-foot { margin: 22px 0 0; font-size: .8rem; color: #6c7799; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- Opbouw ---------- */
.app { --tabs-w: 230px; }
.a-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
  background: rgba(5, 7, 15, .85); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.a-header .brand img { width: 40px; height: 40px; }
.a-header .brand small { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-left: 4px; }
.a-header-actions { display: flex; gap: 8px; }

.tabs {
  position: fixed; left: 0; top: 61px; bottom: 0; width: var(--tabs-w);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--border); background: var(--bg);
}
.tabs a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  color: #c7d0ea; text-decoration: none; font-weight: 600; transition: background .2s, color .2s;
}
.tabs a i { width: 20px; text-align: center; color: var(--muted); }
.tabs a:hover { background: var(--surface-2); color: #fff; }
.tabs a.active { background: rgba(47, 107, 255, .16); color: #fff; }
.tabs a.active i { color: var(--blue-2); }

.a-main { margin-left: var(--tabs-w); padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: calc(1100px + var(--tabs-w)); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.panel-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 4px; }
.panel-head p { margin: 0; }
.card h2, .card-head h2 { font-size: 1.1rem; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.card h2 i { color: var(--blue-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.stack { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.list-title { font-size: 1.1rem; margin: 26px 0 12px; color: #dfe6ff; }
.link-btn { background: none; border: 0; color: var(--blue-2); font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.link-btn:hover { background: var(--surface-2); }
.form-grid.three { grid-template-columns: 1.4fr 1fr 1fr; }
.save-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
}
input[type="time"], input[type="url"] {
  width: 100%; min-height: 48px; padding: 12px 14px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: #fff; font-size: 16px; color-scheme: dark;
}
input[type="url"]:focus, input[type="time"]:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(47, 107, 255, .18); }

/* Schakelaar */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; margin-bottom: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span {
  position: relative; width: 48px; height: 28px; border-radius: 999px; flex: none;
  background: rgba(255, 255, 255, .15); transition: background .2s;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .2s var(--ease);
}
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* ---------- Statistieken ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile-stat { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.tile-stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tile-stat .val { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile-stat.live { border-color: rgba(91, 227, 154, .35); background: rgba(91, 227, 154, .06); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #5be39a; box-shadow: 0 0 0 0 rgba(91, 227, 154, .6); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 9px rgba(91, 227, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 227, 154, 0); } }

.chart-card .chart { margin-top: 12px; }
.chart { position: relative; width: 100%; height: 220px; }
.chart-sm { height: 170px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: rgba(255, 255, 255, .07); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--blue-2); }
.chart .bar.dim { fill: rgba(91, 140, 255, .35); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .bar { pointer-events: none; transition: fill .15s; }
.chart .bar.hover { fill: #8fb0ff; }
.chart .hit:hover { fill: rgba(255, 255, 255, .04); }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; text-align: center; padding: 16px; }
.chart-tip {
  position: fixed; z-index: 300; pointer-events: none; padding: 8px 12px; border-radius: 10px;
  background: #fff; color: #0a0f1f; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap;
}
.chart-tip small { display: block; font-weight: 500; color: #4a5470; }
.table-wrap { margin-top: 12px; max-height: 320px; overflow: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-wrap th, .table-wrap td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.table-wrap td:not(:first-child), .table-wrap th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

.actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.act { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); }
.act i { color: var(--blue-2); }
.act .fa-whatsapp { color: var(--wa); }
.act .n { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.act .t { font-size: .8rem; color: var(--muted); }

.barlist { display: grid; gap: 10px; margin-top: 14px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .92rem; }
.barrow .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow .num { color: #dfe6ff; font-weight: 600; font-variant-numeric: tabular-nums; }
.barrow .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.barrow .fill { height: 100%; border-radius: 4px; background: var(--blue-2); }
.barlist .none { color: var(--muted); font-size: .92rem; }

/* ---------- Agenda ---------- */
.gcal { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.gcal-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(47, 107, 255, .15); color: var(--blue-2); }
.gcal.linked .gcal-icon { background: rgba(91, 227, 154, .14); color: #5be39a; }
.gcal h2 { margin-bottom: 4px; }
.gcal p { margin: 0 0 10px; color: #c7d0ea; }
.gcal .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gcal ol { margin: 8px 0 12px; padding-left: 20px; color: #c7d0ea; }
.gcal ol li { margin-bottom: 6px; }
.gcal .ical-row { display: flex; gap: 8px; margin-top: 8px; }
.gcal .ical-row input { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: #c7d0ea; }
.pill.ok { background: rgba(91, 227, 154, .14); color: #5be39a; }
.pill.warn { background: rgba(255, 201, 64, .14); color: var(--gold); }
.pill.google { background: rgba(66, 133, 244, .16); color: #8ab4f8; }

.a-list { display: grid; gap: 10px; }
.a-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.a-item.clickable { cursor: pointer; transition: border-color .2s; }
.a-item.clickable:hover { border-color: rgba(91, 140, 255, .45); }
.a-item h3 { font-size: 1.02rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.a-item .meta { color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.a-date { width: 56px; text-align: center; border-radius: 12px; background: rgba(47, 107, 255, .12); padding: 6px 0; }
.a-date b { display: block; font-size: 1.35rem; line-height: 1.1; }
.a-date span { font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.a-empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.past { margin-top: 22px; }
.past summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 8px 0; }
.past .a-list { margin-top: 10px; opacity: .7; }

/* Dialoog */
.a-dialog { background: transparent; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
.a-dialog-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.a-dialog-card .card-head { margin-bottom: 16px; }
.a-dialog-card .vk-close { position: static; }
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.dialog-actions .btn-primary { margin-left: auto; }

/* ---------- Foto's ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 30px 20px; border-radius: var(--radius); border: 2px dashed rgba(91, 140, 255, .45);
  background: rgba(47, 107, 255, .06); transition: background .2s, border-color .2s;
}
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone i { font-size: 2rem; color: var(--blue-2); }
.dropzone strong { font-size: 1.1rem; }
.dropzone.drag, .dropzone:hover { background: rgba(47, 107, 255, .12); border-color: var(--blue-2); }
.dropzone:focus-within { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.upload-opts { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.upload-opts label { font-weight: 600; font-size: .92rem; color: #dfe6ff; }
.upload-opts select { width: auto; min-width: 160px; }
.uploads { display: grid; gap: 6px; margin-top: 12px; }
.up { display: flex; align-items: center; gap: 10px; font-size: .9rem; padding: 8px 12px; border-radius: 10px; background: var(--surface); }
.up .bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.up .bar i { display: block; height: 100%; width: 0; background: var(--blue-2); transition: width .3s; }
.up.done .bar i { background: #5be39a; }
.up.err { color: #ff7b8d; }

.photo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ph { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.ph-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.ph-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-img .badge { position: absolute; top: 8px; left: 8px; background: rgba(5, 7, 15, .8); padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.ph-body { padding: 10px; display: grid; gap: 8px; }
.ph-body input, .ph-body select { min-height: 40px; padding: 8px 10px; font-size: 15px; }
.ph-actions { display: flex; gap: 6px; }
.ph-actions .icon-btn { width: 40px; height: 40px; border-radius: 10px; }
.ph-actions .icon-btn.danger { margin-left: auto; }
.icon-btn.danger:hover { background: #d93a52; border-color: #d93a52; }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }

/* ---------- Vragen ---------- */
.faq-edit { padding: 16px; }
.faq-edit .row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.faq-edit .row .num { font-weight: 800; color: var(--blue-2); width: 26px; }
.faq-edit .row input { flex: 1; }

/* Recensies */
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .dim { color: rgba(255, 255, 255, .2); }
.review-text { color: #c7d0ea; margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Mobiel ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .tabs {
    top: auto; bottom: 0; right: 0; width: auto; z-index: 60;
    flex-direction: row; justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--border);
    background: rgba(5, 7, 15, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .tabs a { flex-direction: column; gap: 3px; padding: 8px 2px; font-size: .68rem; flex: 1; text-align: center; border-radius: 10px; }
  .tabs a i { font-size: 1.1rem; width: auto; }
  .a-main { margin-left: 0; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .save-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .admin .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .grid-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile-stat:first-child { grid-column: 1 / -1; }
  .tile-stat .val { font-size: 1.6rem; }
  .a-header { padding-inline: 14px; }
  .a-header .brand span { font-size: 1rem; }
  .actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
  .form-grid.three .field:first-child { grid-column: 1 / -1; }
  .a-item { grid-template-columns: auto 1fr; }
  .a-item > .icon-btn, .a-item > .item-actions { grid-column: 1 / -1; justify-self: end; }
  .gcal { grid-template-columns: 1fr; }
  .save-bar .btn { width: 100%; }
  .photo-admin { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ph-actions .icon-btn { width: 36px; height: 36px; }
  .panel-head .btn-primary { flex: none; }
}

/* =========================================================
   Gebruikers, logboek, account, 2FA
   ========================================================= */
.login-step { display: block; }
.login-step .link-btn { display: block; margin: 12px auto 0; font-size: .9rem; }
.login-step .link-btn.muted { color: var(--muted); }
.code-input {
  text-align: center; font-size: 1.6rem !important; letter-spacing: .3em; font-weight: 700;
  font-variant-numeric: tabular-nums; padding-left: 14px !important; padding-right: 14px !important;
}
.strength { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.strength span { display: block; height: 100%; width: 0; border-radius: 3px; background: #ff5d73; transition: width .3s, background .3s; }
.strength span[data-level="2"] { background: var(--gold); }
.strength span[data-level="3"], .strength span[data-level="4"] { background: #5be39a; }

/* Gebruiker rechtsboven */
.user-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: #fff; text-decoration: none; line-height: 1.15;
}
.user-chip:hover { border-color: rgba(91, 140, 255, .5); }
.user-chip b { display: block; font-size: .9rem; }
.user-chip small { display: block; font-size: .72rem; color: var(--muted); }
.avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), #7b5cff); color: #fff; font-weight: 700; font-size: .95rem;
}
.avatar.sm { width: 22px; height: 22px; font-size: .7rem; }
.avatar.lg { width: 46px; height: 46px; font-size: 1.15rem; }

.master-banner {
  display: flex; gap: 12px; align-items: center; margin: 0; padding: 12px 20px 12px calc(var(--tabs-w) + 20px);
  background: rgba(255, 201, 64, .12); border-bottom: 1px solid rgba(255, 201, 64, .35); color: #ffe3a1; font-size: .92rem;
}
.master-banner i { color: var(--gold); }
.master-banner a { color: #fff; }

.tabs-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.tabs .tab-more { display: none; }

.tile-stat .sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* Voorbeeld van de aankondiging */
.ann-preview {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; margin-top: 4px;
  background: linear-gradient(90deg, #1f4fd8, #2f6bff 60%, #5b8cff); color: #fff; font-weight: 600; font-size: .92rem;
}
.ann-preview[hidden] { display: none; }

/* Logboek (tijdlijn) */
.timeline { display: grid; gap: 8px; }
.tl-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.tl-item.undone { opacity: .55; }
.tl-item.undone .tl-text { text-decoration: line-through; }
.tl-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(47, 107, 255, .14); color: var(--blue-2); }
.tl-item.sec .tl-icon { background: rgba(255, 255, 255, .06); color: var(--muted); }
.tl-text { margin: 0 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; color: var(--muted); font-size: .84rem; }
.tl-who { display: inline-flex; align-items: center; gap: 6px; color: #dfe6ff; }
#logUser { width: auto; min-width: 170px; }

/* Gebruikers */
.user-item { grid-template-columns: auto 1fr auto; }
.user-item h3 { display: flex; align-items: center; gap: 8px; }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item-actions .icon-btn { width: 40px; height: 40px; border-radius: 10px; }
.info-card { margin-top: 18px; }
.info-card ul { margin: 0; padding-left: 18px; color: #c7d0ea; }
.info-card li { margin-bottom: 6px; }
.role-pick { border: 0; padding: 0; margin: 4px 0 10px; }
.role-pick legend { font-weight: 600; font-size: .9rem; color: #dfe6ff; margin-bottom: 8px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.presets .chip { min-height: 38px; padding: 6px 14px; font-size: .88rem; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perm-grid .check { margin: 0; padding: 10px 12px; font-size: .9rem; }
.perm-grid .check i { color: var(--blue-2); width: 18px; }
.perm-grid .check:has(input:disabled) { opacity: .75; cursor: default; }
pre.cred {
  white-space: pre-wrap; background: rgba(255, 255, 255, .05); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; font-size: .9rem; color: #dfe6ff; font-family: ui-monospace, Consolas, monospace;
}
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Account & 2FA */
.setup-steps { padding-left: 20px; color: #c7d0ea; }
.setup-steps li { margin-bottom: 6px; }
.qr-setup { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin: 14px 0; }
.qr { width: 190px; height: 190px; padding: 8px; background: #fff; border-radius: 14px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-setup .secret { display: block; margin: 6px 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: .95rem; letter-spacing: .06em; word-break: break-all; }
.qr-setup .code-input { font-size: 1.3rem !important; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.codes code { padding: 10px; text-align: center; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 1rem; letter-spacing: .08em; }

/* Meer (mobiel) */
.more-grid { display: grid; gap: 8px; }
.more-item {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; width: 100%;
  background: var(--surface); border: 1px solid var(--border); color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem; cursor: pointer; text-align: left;
}
.more-item > i:first-child { width: 22px; color: var(--blue-2); text-align: center; }
.more-item .go { margin-left: auto; color: var(--muted); }
.more-item span { flex: 1; }

@media (max-width: 860px) {
  .tabs [data-tab="teksten"], .tabs [data-tab="vragen"], .tabs [data-tab="recensies"], .tabs [data-tab="logboek"],
  .tabs [data-tab="gebruikers"], .tabs [data-tab="account"], .tabs-sep { display: none !important; }
  .tabs .tab-more { display: flex; }
  .master-banner { padding-left: 16px; }
  .user-chip { padding: 4px; }
}
@media (max-width: 600px) {
  .tl-item { grid-template-columns: auto 1fr; }
  .tl-item > .btn { grid-column: 1 / -1; justify-self: start; }
  .user-item { grid-template-columns: auto 1fr; }
  .user-item .item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .perm-grid { grid-template-columns: 1fr; }
  .qr-setup { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .qr-setup .ical-row { justify-content: center; }
  #logUser { width: 100%; }
}

/* Invoerveld met knop ernaast (overal) */
.ical-row { display: flex; gap: 8px; align-items: stretch; }
.ical-row input { flex: 1; min-width: 0; }
.ical-row .btn { flex: none; min-height: 48px; border-radius: 12px; }

/* =========================================================
   Aanvragen
   ========================================================= */
.tabs a { position: relative; }
.tab-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: #ff4f6d; color: #fff; font-size: .75rem; font-weight: 800;
}
.req-alert {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 14px 18px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 79, 109, .18), rgba(255, 79, 109, .05)); border: 1px solid rgba(255, 79, 109, .4);
  color: #fff; font-weight: 700; text-decoration: none;
}
.req-alert i:first-child { color: #ff7b8d; }
.req-alert i:last-child { margin-left: auto; }
.req-filters { justify-content: flex-start; margin-bottom: 16px; }
.req-card {
  padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--border); display: grid; gap: 12px;
}
.req-card.status-nieuw { border-left-color: #ff4f6d; }
.req-card.status-behandeling { border-left-color: var(--gold); }
.req-card.status-bevestigd { border-left-color: #5be39a; }
.req-card.status-afgewezen { opacity: .65; }
.req-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.req-title h3 { margin: 0 0 2px; font-size: 1.1rem; overflow-wrap: anywhere; }
.pill.new { background: rgba(255, 79, 109, .16); color: #ff9aac; }
.req-warn { padding: 10px 12px; border-radius: 12px; background: rgba(255, 201, 64, .1); border: 1px solid rgba(255, 201, 64, .35); color: #ffe3a1; font-size: .9rem; }
.req-warn i { color: var(--gold); }
.req-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .93rem; }
.req-facts dt { color: var(--muted); }
.req-facts dd { margin: 0; color: #dfe6ff; white-space: pre-line; overflow-wrap: anywhere; }
.req-note { min-height: 0; }
.req-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.req-actions select { width: auto; min-width: 160px; min-height: 40px; padding: 8px 36px 8px 12px; }
.req-actions .danger { margin-left: auto; }
@media (max-width: 860px) {
  .tab-badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; font-size: .65rem; }
}
@media (max-width: 600px) {
  .req-head { grid-template-columns: auto 1fr; }
  .req-head .pill { grid-column: 1 / -1; justify-self: start; }
  .req-facts { grid-template-columns: 1fr; gap: 2px; }
  .req-facts dd { margin-bottom: 6px; }
  .req-actions select { flex: 1 1 100%; }
}
.req-title .meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: #c7d0ea; font-size: .9rem; }
.req-title .meta .muted { color: var(--muted); }

/* Uitloggen in de bovenbalk */
.logout-top { min-height: 40px; }
.logout-top:hover { background: rgba(255, 93, 115, .15); border-color: rgba(255, 93, 115, .45); color: #ffb3bf; }
@media (max-width: 860px) { .logout-top { width: 42px; height: 42px; padding: 0; border-radius: 50%; } }

/* =========================================================
   Bevestigingsvenster (vervangt de browsermeldingen)
   ========================================================= */
.ask-dialog { width: min(440px, calc(100% - 24px)); }
.ask-card { text-align: center; padding: 28px 24px 22px; }
.ask-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem;
  background: rgba(47, 107, 255, .15); color: var(--blue-2); border: 1px solid rgba(91, 140, 255, .3);
}
.ask-icon.danger { background: rgba(255, 93, 115, .14); color: #ff7b8d; border-color: rgba(255, 93, 115, .35); }
.ask-card h2 { font-size: 1.3rem; margin: 0 0 8px; }
.ask-card > p { color: #c7d0ea; margin: 0 0 18px; line-height: 1.5; overflow-wrap: anywhere; }
.ask-card .field { text-align: left; margin-bottom: 18px; }
.ask-actions { display: flex; gap: 10px; }
.ask-actions .btn { flex: 1; }
.btn-danger { background: linear-gradient(135deg, #ff5d73, #d93a52); color: #fff; box-shadow: 0 8px 24px rgba(255, 93, 115, .3); }
.btn-danger:hover { box-shadow: 0 12px 30px rgba(255, 93, 115, .4); }
.ask-dialog[open] { animation: pop .22s var(--ease); }

/* Inloggegevens met losse kopieerknoppen */
.cred-box > p:first-child { margin-top: 0; }
.cred-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 10px 10px 12px; margin-bottom: 8px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
}
.cred-row.pw { border-color: rgba(91, 140, 255, .45); background: rgba(47, 107, 255, .08); }
.cred-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--blue-2); }
.cred-txt { min-width: 0; }
.cred-txt small { display: block; color: var(--muted); font-size: .76rem; }
.cred-txt code { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 1rem; color: #fff; overflow-wrap: anywhere; user-select: all; }
.cred-row .icon-btn { width: 40px; height: 40px; border-radius: 10px; }

/* Extra beheerpanelen, ook op kleine telefoons. */
.feature-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 12px; }
.feature-card { min-width: 0; overflow-wrap: anywhere; }
.feature-card p:last-child { margin-bottom: 0; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.live-grid .card { padding: 16px; }
.live-grid h3 { font-size: 1rem; }
#liveCard { margin: 0; padding: 28px; border: 0; }
.live-dialog { width: min(760px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid rgba(91,140,255,.25); border-radius: 24px; background: #0d1222; color: #fff; }
.live-dialog::backdrop { background: rgba(3,6,16,.8); backdrop-filter: blur(6px); }
.live-close { float: right; margin: 0 0 12px 12px; }
.live-dialog .live-grid { clear: both; gap: 12px; }
.live-dialog .live-grid .card { background: rgba(255,255,255,.035); border-radius: 16px; border-left: 3px solid #5b8cff; }
.live-dialog #liveStatus { color: #80e3b0; font-size: .9rem; padding-block: 12px; }
.live-empty { padding: 24px; text-align: center; }
button.tile-stat.live { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.tile-stat.live:hover { border-color: #5b8cff; background: rgba(47,107,255,.12); }
button.tile-stat.live:focus-visible { outline: 3px solid #5b8cff; outline-offset: 3px; }
@media(max-width:600px){#liveCard{padding:20px}.live-dialog .live-grid{grid-template-columns:minmax(0,1fr)}}
.album-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--border); padding-block: 12px; }
.album-row > span { flex: 1 1 180px; }
.a-main > *, .a-dialog-card > *, .a-item > *, .req-card > * { min-width: 0; }
.a-dialog-card { overflow-wrap: anywhere; }
.a-dialog-card input { min-width: 0; }
.tabs { overflow-y: auto; }
.stack, .a-list { grid-template-columns: minmax(0, 1fr); }
.panel { overflow-wrap: anywhere; }
.pill { white-space: normal; }
#tab-account > .card { margin-block: 20px; }
#personalEmailCard { border-color: rgba(91,140,255,.24); background: linear-gradient(135deg,rgba(47,107,255,.07),rgba(255,255,255,.025)); }
.account-email-form { max-width: 780px; margin-top: 22px; }
.account-email-form .field { margin: 0; }
.account-email-form .form-grid { gap: 18px; }
.account-email-form input { min-height: 52px; padding: 12px 14px; border-radius: 14px; }
.account-email-form .btn { justify-self: start; width: auto; padding-inline: 24px; }
.email-state { justify-self: start; margin: 0; padding: 8px 12px; border: 1px solid rgba(91,140,255,.25); border-radius: 10px; color: #c9d8ff; background: rgba(47,107,255,.08); font-size: .9rem; }
.email-intro { background: linear-gradient(120deg,rgba(47,107,255,.13),rgba(255,255,255,.025)); }
.email-badge { display:inline-block; color:#9edbbb; font-size:.8rem; font-weight:600; padding:6px 10px; border-radius:8px; background:rgba(90,220,160,.08); margin-bottom:14px; }
.email-intro h2 { margin-bottom:10px; }
.email-notice { color:var(--muted); line-height:1.65; }
.email-recipient { min-width:0; margin:0; padding-top:18px; }
.email-recipient legend { font-size:.8rem; color:var(--muted); padding-inline:8px; }
.email-recipient-head { display:flex; align-items:center; gap:16px; }
.email-recipient-head .field { flex:1; }
.email-preferences { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:10px; }
.email-option { display:flex; gap:10px; align-items:center; min-height:48px; padding:12px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.025); cursor:pointer; }
.email-option:has(input:checked) { background:rgba(47,107,255,.12); border-color:rgba(91,140,255,.5); }
.email-option input { width:19px; height:19px; flex:none; accent-color:#316bff; }
.email-actions { display:flex; flex-wrap:wrap; gap:12px; }
.email-test .btn { justify-self:start; }
.twofa-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; }
.twofa-choice { padding:20px; border:1px solid var(--border); border-radius:16px; background:rgba(255,255,255,.025); }
.twofa-choice p { line-height:1.6; }
.email-2fa-setup { padding-top:24px; margin-top:24px; border-top:1px solid var(--border); }
@media(max-width:600px){.twofa-choices{grid-template-columns:1fr}.email-recipient-head{align-items:stretch;flex-direction:column;gap:0}.email-recipient-head .btn{align-self:flex-end;margin-bottom:14px}.email-actions .btn{flex:1 1 180px}.email-test .form-grid{grid-template-columns:1fr}}
.account-email-form .form-msg:empty { display: none; }
.push-status { line-height: 1.6; }
.push-status.error { color: #ffadb9; }
.backup-hero { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:28px; background:linear-gradient(120deg,rgba(47,107,255,.14),rgba(255,255,255,.025)); border-color:rgba(91,140,255,.25); }
.backup-hero-copy { max-width:650px; }
.backup-hero h2 { margin:8px 0 10px; font-size:1.4rem; }
.backup-hero p:last-child { margin-bottom:0; line-height:1.65; }
.backup-create { flex:none; border-radius:12px; gap:10px; }
.backup-list-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:8px; }
.backup-list-head h2 { font-size:1.05rem; margin:0; }
.backup-row { display:flex; align-items:center; gap:20px; padding:20px; border-radius:16px; }
.backup-row-main { display:flex; gap:16px; align-items:center; flex:1; min-width:0; }
.backup-symbol { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; color:#8eafff; background:rgba(47,107,255,.1); flex:none; }
.backup-row-copy { min-width:0; }
.backup-row-copy h3 { font-size:1rem; margin:0 0 5px; }
.backup-row-copy p { margin:0; line-height:1.6; }
.backup-counts { color:#8e9cbb; }
.backup-latest { color:#83dcad; background:rgba(80,200,130,.08); border-radius:7px; padding:5px 8px; font-size:.7rem; white-space:nowrap; }
.backup-row-actions { margin:0; gap:8px; flex:none; }
.backup-row-actions .btn { border-radius:10px; gap:8px; }
.backup-download { background:rgba(47,107,255,.1); border-color:rgba(91,140,255,.3); }
.backup-restore { color:var(--muted); }
#backupsContent>.form-msg:empty { display:none; }
@media(max-width:1100px){.backup-row{flex-wrap:wrap}.backup-row-actions{width:100%;padding-top:14px;border-top:1px solid var(--border)}}
@media(max-width:600px){.backup-hero{padding:20px;align-items:stretch;flex-direction:column;gap:20px}.backup-create{justify-content:center}.backup-row{padding:16px;gap:12px}.backup-symbol{width:40px;height:40px}.backup-row-main{gap:12px}.backup-latest{margin-left:52px}.backup-row-actions .btn{flex:1 1 140px}}
.report-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin-bottom:4px; }
.report-card { padding:26px; background:linear-gradient(145deg,rgba(24,34,60,.5),rgba(255,255,255,.025)); }
.report-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.report-eyebrow { color:var(--blue-2); text-transform:uppercase; letter-spacing:2px; font-size:.7rem; font-weight:700; margin:0 0 6px; }
.report-title { margin:0; font-size:1.55rem; text-transform:capitalize; }
.report-label { color:var(--muted); border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:.75rem; white-space:nowrap; }
.report-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 22px; }
.report-metric { min-width:0; padding:20px; border-radius:15px; border:1px solid var(--border); background:rgba(255,255,255,.03); }
.report-metric dt { color:var(--muted); font-size:.85rem; }
.report-metric dd { margin:10px 0 0; font-size:clamp(1.8rem,3vw,2.5rem); font-weight:700; line-height:1.1; letter-spacing:-1px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.report-metric.blue { background:linear-gradient(135deg,rgba(47,107,255,.22),rgba(47,107,255,.06)); border-color:rgba(91,140,255,.32); }
.report-metric.blue dd { color:#9bbaff; }
.report-metric.green dd { color:#80ddb1; }
.report-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; margin:0; }
.report-detail { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 0; border-bottom:1px solid var(--border); min-width:0; }
.report-detail dt { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.88rem; }
.report-detail i { color:var(--blue-2); width:18px; text-align:center; flex:none; }
.report-detail dd { margin:0; font-weight:600; font-size:1.1rem; font-variant-numeric:tabular-nums; }
.report-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding-top:18px; }
.report-footer p { margin:0; font-size:.85rem; line-height:1.6; }
.report-footer time { font-size:.75rem; }
.report-trend { color:#b7c8ee; }
@media(max-width:1000px){.report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.report-card{padding:18px}.report-label{display:none}.report-header{margin-bottom:18px}.report-title{font-size:1.35rem}.report-metric{padding:16px 12px}.report-metric dt{font-size:.78rem}.report-details{grid-template-columns:minmax(0,1fr)}.report-toolbar{justify-content:flex-start}.report-toolbar .btn{flex:1 1 180px}.report-footer{align-items:flex-start;flex-direction:column}}
@media(max-width: 600px) {
  .account-email-form .form-grid { grid-template-columns: minmax(0,1fr); }
  .account-email-form .btn { width: 100%; }
}
@media(max-width: 860px) {
  .tabs [data-tab="cadeaubonnen"], .tabs [data-tab="backups"], .tabs [data-tab="rapporten"], .tabs [data-tab="email"] { display: none !important; }
  .feature-actions .btn { flex: 1 1 150px; }
}
@media(max-width: 600px) {
  .admin .btn { white-space: normal; }
  .admin .a-main { padding-inline: 12px; }
  .admin .panel-head { flex-wrap: wrap; gap: 12px; }
  .admin .a-item { gap: 10px; }
  .admin .form-grid.three { grid-template-columns: 1fr; }
}
