/* PindaFramework - webpaneel */

:root {
  --bg: #0e0c0a;
  --bg-2: #13110e;
  --surface: #191612;
  --surface-2: #211d18;
  --surface-3: #2a251f;
  --border: #2d2721;
  --border-strong: #3d352c;
  --text: #f0eadf;
  --text-2: #c9bfb1;
  --muted: #8f8476;
  --primary: #ffc857;
  --secondary: #e9724c;
  --grad: linear-gradient(135deg, #ffc857, #e9724c);
  --success: #7be495;
  --error: #ff6b6b;
  --warning: #ffb347;
  --info: #4d9dff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px -16px rgba(0, 0, 0, .7);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
::selection { background: rgba(255, 200, 87, .3); }

.muted { color: var(--muted); }
.success-text { color: var(--success); }
.error-text { color: var(--error); }
.warning-text { color: var(--warning); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.i { width: 18px; height: 18px; flex: none; }

/* ----------------------------------------------------------------- laden */

.boot, .page-loading { display: grid; place-items: center; min-height: 60vh; }
.boot { min-height: 100vh; }

.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- inloggen */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 50% -12%, rgba(255, 200, 87, .13), transparent 62%),
    radial-gradient(700px 400px at 90% 110%, rgba(233, 114, 76, .08), transparent 60%),
    var(--bg);
}
.login-card {
  width: min(430px, 100%);
  text-align: center;
  padding: 38px 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.login-logo { width: 64px; height: 64px; margin-bottom: 14px; }
.login-card h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.login-card h1 span { color: var(--muted); font-weight: 500; }
.login-card .lead { color: var(--text-2); margin: 14px 0 6px; }
.login-steps { text-align: left; margin: 22px 0 6px; padding: 0; list-style: none; display: grid; gap: 10px; }
.login-steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.login-steps b {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--primary); font-size: 12.5px;
}
.login-foot { margin: 24px 0 0; color: var(--muted); font-size: 12.5px; }
.kbd {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  padding: 1px 7px;
  border-radius: 6px;
  color: var(--primary);
  white-space: nowrap;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  text-align: left;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  margin-top: 16px;
}
.alert.error { border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); color: #ffb4b4; }
.alert.warning { border-color: rgba(255, 179, 71, .35); background: rgba(255, 179, 71, .08); color: #ffd39a; }
.alert.info { border-color: rgba(77, 157, 255, .3); background: rgba(77, 157, 255, .07); color: #b9d6ff; }

/* ----------------------------------------------------------------- opbouw */

.layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 18px 14px 14px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.brand img { width: 36px; height: 36px; }
.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub { color: var(--muted); font-size: 12px; margin-top: -1px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  padding: 16px 12px 6px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 550;
  font-size: 14px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a .i { opacity: .75; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active {
  background: linear-gradient(90deg, rgba(255, 200, 87, .14), rgba(233, 114, 76, .04));
  color: var(--primary);
  box-shadow: inset 2px 0 0 var(--primary);
}
.nav a.active .i { opacity: 1; }

.sidebar-foot { margin-top: auto; padding-top: 14px; }
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.me-text { min-width: 0; flex: 1; }
.me-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { min-width: 0; display: flex; flex-direction: column; }
.main { padding: 28px 34px 56px; width: 100%; max-width: 1440px; outline: none; }

.topbar { display: none; }
.scrim { display: none; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 5px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.back:hover { color: var(--text); text-decoration: none; }
.back .i { width: 16px; height: 16px; }

/* ----------------------------------------------------------------- kaarten */

.grid { display: grid; gap: 16px; }
.main > .grid + .grid, .main > .grid + .card, .main > .card + .grid, .main > .card + .card,
.main > .grid + .shop-cards { margin-top: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); align-items: start; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; margin: 0; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.card-head h2 .i { color: var(--primary); width: 17px; height: 17px; }
.card-head .count { color: var(--muted); font-weight: 500; font-size: 13px; }
.card-body { padding: 16px 18px; }
.card-body > :last-child { margin-bottom: 0; }

.stat { padding: 16px 18px 17px; position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.stat-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 200, 87, .1);
  color: var(--primary);
}
.stat-icon .i { width: 18px; height: 18px; }
.stat-value {
  font-size: 27px;
  font-weight: 750;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.stat-value small { font-size: 15px; color: var(--muted); font-weight: 600; }
.stat-value.compact { font-size: 20px; padding-top: 5px; }
.stat-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.error { color: var(--error); }

.meter { height: 6px; background: var(--surface-3); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.meter.warning > i { background: var(--warning); }
.meter.error > i { background: var(--error); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.empty { text-align: center; color: var(--muted); padding: 30px 16px; font-size: 14px; }
.empty .i { width: 28px; height: 28px; display: block; margin: 0 auto 8px; opacity: .6; }

.empty-page { text-align: center; padding: 70px 16px; }
.empty-page h2 { margin: 0 0 8px; font-size: 19px; }
.empty-page p { color: var(--muted); }

/* ----------------------------------------------------------------- tabellen */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.reason { max-width: 360px; overflow-wrap: anywhere; }
td.actions { text-align: right; white-space: nowrap; }

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-name { font-weight: 600; white-space: nowrap; }
.who-name a { color: var(--text); }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-3);
  image-rendering: pixelated;
  flex: none;
  object-fit: cover;
}
.avatar.md { width: 36px; height: 36px; border-radius: 9px; }
.avatar.lg { width: 76px; height: 76px; border-radius: 16px; box-shadow: 0 0 0 1px var(--border-strong); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

/* ----------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge.rank {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border-color: color-mix(in srgb, var(--c) 32%, transparent);
}
.badge.success { color: var(--success); background: rgba(123, 228, 149, .1); border-color: rgba(123, 228, 149, .25); }
.badge.error { color: var(--error); background: rgba(255, 107, 107, .1); border-color: rgba(255, 107, 107, .28); }
.badge.warning { color: var(--warning); background: rgba(255, 179, 71, .1); border-color: rgba(255, 179, 71, .28); }
.badge.info { color: var(--info); background: rgba(77, 157, 255, .1); border-color: rgba(77, 157, 255, .28); }
.badge.plain { background: transparent; border-color: var(--border-strong); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: #5b5248; flex: none; display: inline-block; }
.dot.on { background: var(--success); box-shadow: 0 0 0 3px rgba(123, 228, 149, .16); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.amount-plus { color: var(--success); }
.amount-min { color: var(--error); }

/* ----------------------------------------------------------------- knoppen en invoer */

.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, border-color .15s, filter .15s, opacity .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { border-color: #574c3f; background: var(--surface-3); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: var(--grad); color: #1d1408; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--error); border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); }
.btn.danger:hover { background: rgba(255, 107, 107, .15); }
.btn.solid-danger { background: var(--error); color: #2a0b0b; border-color: transparent; }
.btn.warn { color: var(--warning); border-color: rgba(255, 179, 71, .35); background: rgba(255, 179, 71, .07); }
.btn.warn:hover { background: rgba(255, 179, 71, .14); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon-only { padding: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: currentColor;
  border-top-color: var(--text);
  animation: spin .7s linear infinite;
}
.btn.primary.busy::after { border-top-color: #1d1408; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.input, select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 200, 87, .15); }
.input::placeholder, textarea::placeholder { color: #6c6257; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 550; }
.field + .field, .field + .row, .row + .field, .row + .row { margin-top: 14px; }
.field .hint { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.field-label { display: block; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 160px; margin-top: 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }

.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search .input { padding-left: 38px; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 5px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.seg input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ----------------------------------------------------------------- profiel */

.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-main { min-width: 0; flex: 1; }
.profile h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; }
.uuid { font-family: var(--mono); font-size: 12px; color: var(--muted); background: transparent; border: 0; padding: 0; cursor: pointer; }
.uuid:hover { color: var(--text-2); }

.balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.balance div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; min-width: 0; }
.balance span { display: block; color: var(--muted); font-size: 12px; font-weight: 550; }
.balance b { display: block; font-size: 15.5px; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.punish-bar { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----------------------------------------------------------------- skills */

.skills-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px 16px; }
.skill-row { min-width: 0; }
.skill-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.skill-row .meter { margin-top: 6px; }
.skill-sub { font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- grafiek */

.chart { position: relative; height: 230px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .line-online { stroke: var(--primary); stroke-width: 2; fill: none; }
.chart .line-tps { stroke: var(--info); stroke-width: 1.6; fill: none; opacity: .85; }
.chart .hover-line { stroke: var(--border-strong); stroke-width: 1; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 2;
}
.chart-tip b { color: var(--primary); }
.chart-tip .t { color: var(--info); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }

/* ----------------------------------------------------------------- shops */

.shop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.shop-card { padding: 16px 18px; cursor: pointer; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; gap: 12px; }
.shop-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.shop-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.shop-card h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.shop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 12.5px; color: var(--muted); }
.shop-stats b { display: block; color: var(--text); font-size: 14.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item.off { opacity: .55; }
.item-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-name.ench { color: #d0a8ff; }
.item-mat { font-size: 11.5px; color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-price { font-size: 17px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.item-price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.item-stock { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- console */

.console {
  background: #090807;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  height: min(64vh, 680px);
  overflow: auto;
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d9d2c6;
}
.console .warn { color: var(--warning); }
.console .err { color: var(--error); }
.console .cmd { color: var(--primary); }
.console-form { display: flex; gap: 8px; margin-top: 12px; }
.console-form .prompt { position: relative; flex: 1; }
.console-form .prompt::before { content: ">"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--primary); font-family: var(--mono); font-weight: 700; }
.console-form .input { font-family: var(--mono); padding-left: 30px; }

/* ----------------------------------------------------------------- dialoog */

dialog {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 0;
  width: min(500px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .85);
}
dialog::backdrop { background: rgba(6, 5, 4, .7); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }
.modal-head { padding: 20px 22px 4px; }
.modal-head h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.modal-body { padding: 16px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- meldingen */

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--success);
  padding: 11px 15px;
  border-radius: 11px;
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in .2s ease-out;
  transition: opacity .25s, transform .25s;
}
.toast.error { border-left-color: var(--error); }
.toast.out { opacity: 0; transform: translateX(10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ----------------------------------------------------------------- mobiel */

@media (max-width: 920px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    max-width: 86vw;
    z-index: 60;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55; }
  .topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 40;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(14, 12, 10, .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .topbar img { width: 26px; height: 26px; }
  .topbar-title { font-weight: 650; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 22px; }
  .stat-value { font-size: 23px; }
  th, td { padding-left: 14px; padding-right: 14px; }
  .card-head, .card-body { padding-left: 15px; padding-right: 15px; }
}

@media (max-width: 520px) {
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat-icon { display: none; }
  .stat-value { font-size: 20px; }
  .balance { grid-template-columns: 1fr; }
  .profile h1 { font-size: 22px; }
  .avatar.lg { width: 60px; height: 60px; }
  .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ----------------------------------------------------------------- tabbladen */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -6px 0 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ----------------------------------------------------------------- schakelaar */

.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background .15s, border-color .15s; position: relative; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #8d8274; transition: transform .15s, background .15s; }
.switch input:checked + span { background: rgba(255, 200, 87, .22); border-color: rgba(255, 200, 87, .6); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--primary); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ----------------------------------------------------------------- instellingen */

.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-files { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.settings-files a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; color: var(--text-2); font-weight: 550; font-size: 14px; text-decoration: none; }
.settings-files a:hover { background: var(--surface-2); color: var(--text); }
.settings-files a.active { background: rgba(255, 200, 87, .12); color: var(--primary); }
.settings-select { display: none; }
.cfg-intro { margin: 0 0 16px; }
.cfg-section { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px 10px; margin: 16px 0 0; min-width: 0; }
.cfg-section legend { padding: 0 6px; font-weight: 700; color: var(--primary); font-size: 14px; }
.cfg-section > .cfg-help { display: block; margin: 4px 0 2px; }
.cfg-section .cfg-section { margin-top: 10px; background: rgba(255, 255, 255, .015); }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 11px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cfg-row:last-child { border-bottom: 0; }
.cfg-row.cfg-stack { flex-direction: column; align-items: stretch; }
.cfg-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.cfg-label { font-weight: 600; font-size: 14px; }
.cfg-help { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.cfg-number { width: 160px; flex: none; }
.cfg-wide { width: min(100%, 360px); }
.cfg-string { display: flex; gap: 8px; align-items: center; flex: 1 1 320px; min-width: 0; }
.cfg-row:not(.cfg-stack) .cfg-string { max-width: 420px; }
.cfg-string input[type=color] { width: 42px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-2); flex: none; }
.cfg-map { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.map-row { display: flex; gap: 6px; width: min(100%, 420px); }
.map-row .map-key { flex: 2; }
.map-row .map-value { flex: 1; }
.save-bar {
  position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(33, 29, 24, .94); border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px); box-shadow: var(--shadow); flex-wrap: wrap; grid-column: 1 / -1;
}

/* ----------------------------------------------------------------- Minecraft-tekst */

.mc, .mc-preview { font-family: var(--mono); }
.mc-preview {
  background: rgba(0, 0, 0, .45); background-image: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .35)), linear-gradient(135deg, #3b5a2b, #2c4a6b);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: #fff; font-size: 14px; line-height: 1.6;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 46px;
}
.mc-preview.sm { padding: 7px 10px; font-size: 13px; min-height: 0; border-radius: 8px; }
.mc-b { font-weight: 700; }
.mc-i { font-style: italic; }
.mc-u { text-decoration: underline; }
.mc-s { text-decoration: line-through; }
.mc-u.mc-s { text-decoration: underline line-through; }
.mc-o, .mc-obf { filter: blur(2px); }
.mc-click { text-decoration: underline dotted; }
.mc-hover { cursor: help; }
.mc-ph { display: inline-block; font-size: .85em; padding: 0 5px; border-radius: 5px; background: rgba(77, 157, 255, .25); color: #b9d6ff; text-shadow: none; }
.mc-ph::before { content: "‹"; }
.mc-ph::after { content: "›"; }

/* ----------------------------------------------------------------- teksteditor */

dialog.wide { width: min(880px, calc(100vw - 24px)); }
.te-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.te-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.te-swatch { width: 26px; height: 26px; border-radius: 7px; border: 2px solid rgba(255, 255, 255, .15); background: var(--c); cursor: pointer; padding: 0; }
.te-swatch.sm { width: 20px; height: 20px; border-radius: 5px; }
.te-swatch:hover { transform: scale(1.1); border-color: #fff; }
.te-btn { min-width: 32px; }
.te-sep { width: 1px; height: 22px; background: var(--border-strong); margin: 0 4px; }
.te-group input[type=color] { width: 32px; height: 30px; padding: 2px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; }
.te-chip { border: 1px solid rgba(77, 157, 255, .35); background: rgba(77, 157, 255, .1); color: #b9d6ff; border-radius: 99px; padding: 2px 9px; font: inherit; font-size: 12.5px; font-family: var(--mono); cursor: pointer; }
.te-chip:hover { background: rgba(77, 157, 255, .2); }
.te-placeholders .muted { font-size: 12.5px; margin-right: 2px; }
.te-source { min-height: 90px; line-height: 1.55; font-size: 13.5px; }
.te-hint { font-size: 12.5px; margin: 6px 0 12px; }
.te-preview-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.modal-foot .te-reset { margin-right: auto; }

/* ----------------------------------------------------------------- teksten-lijst */

.text-filters { gap: 10px; justify-content: flex-start; }
.text-filters select { width: auto; min-width: 150px; }
.text-list { display: flex; flex-direction: column; }
.text-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.text-row:hover { background: var(--surface-2); }
.text-key { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }

.appearance-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.appearance-row:last-of-type { border-bottom: 0; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.color-field { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.color-field input { width: 40px; height: 36px; padding: 2px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.color-field span { display: flex; flex-direction: column; font-size: 13.5px; }

/* ----------------------------------------------------------------- serverlijst (MOTD) */

.motd-list { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.motd-item { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.serverlist { display: flex; gap: 10px; padding: 6px; background: rgba(0, 0, 0, .55); border: 1px solid #555; border-radius: 4px; max-width: 640px; width: 100%; font-family: var(--mono); text-shadow: 2px 2px 0 rgba(0, 0, 0, .6); }
.server-icon { width: 64px; height: 64px; image-rendering: pixelated; flex: none; background: var(--surface-3); }
.serverlist-text { min-width: 0; flex: 1; color: #aaa; font-size: 14px; line-height: 1.45; }
.serverlist-top { display: flex; justify-content: space-between; gap: 8px; }
.serverlist-name { color: #fff; }
.serverlist-count { color: #aaa; white-space: nowrap; }
.serverlist-motd { white-space: pre-wrap; overflow: hidden; }

/* ----------------------------------------------------------------- rangen */

.rank-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.rank-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.rank-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.rank-card h3 { margin: 8px 0 0; font-size: 17px; }
.perm-add { display: flex; gap: 8px; }
.perm-chips { margin-top: 10px; max-height: 220px; overflow-y: auto; }
.perm-chips .badge { font-family: var(--mono); font-weight: 500; }
.chip-x { padding: 0 !important; margin-right: -4px; }
.chip-x .i { width: 13px; height: 13px; }

details.manual { margin-top: 12px; text-align: left; }
details.manual summary { cursor: pointer; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
details.manual .chips { margin-top: 8px; }

/* ----------------------------------------------------------------- inventory */

.inv-title { margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.inv-title:first-child { margin-top: 0; }
.inv-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.inv-slot { position: relative; aspect-ratio: 1; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; padding: 3px; min-width: 0; }
.inv-slot.filled { background: var(--surface-3); border-color: var(--border-strong); cursor: pointer; color: var(--text); font: inherit; }
.inv-slot.filled:hover { border-color: var(--error); background: rgba(255, 107, 107, .12); }
.inv-slot.ench { box-shadow: inset 0 0 0 1px rgba(208, 168, 255, .5); }
.inv-slot.money { color: var(--primary); background: rgba(255, 200, 87, .1); border-color: rgba(255, 200, 87, .4); }
.inv-slot.money .i { width: 20px; height: 20px; }
.inv-slot.filled:disabled { cursor: default; opacity: 1; }
.inv-slot.filled:disabled:hover { border-color: var(--border-strong); background: var(--surface-3); }
.inv-name { font-size: 10px; line-height: 1.15; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.inv-amount { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 700; text-shadow: 1px 1px 0 #000; }

/* ----------------------------------------------------------------- 2FA */

.qr-wrap { display: flex; justify-content: center; margin: 18px 0 6px; }
.qr { width: 208px; height: 208px; border-radius: 12px; background: #fff; padding: 6px; image-rendering: pixelated; }
.secret { font-size: 15px; letter-spacing: .06em; background: var(--surface-3); padding: 8px 10px; border-radius: 8px; text-align: center; color: var(--primary); user-select: all; overflow-wrap: anywhere; }
.code-form { display: flex; gap: 8px; margin-top: 18px; }
/* Het codeveld van 2FA: een eigen veld, los van de bestandseditor. De letterafstand komt ook na het
   laatste cijfer; text-indent zet dat recht zodat de code echt in het midden staat. */
.otp-input { position: static; flex: 1 1 auto; min-width: 0; height: auto; font-family: var(--mono); font-size: 24px; line-height: 1.3;
  letter-spacing: .35em; text-indent: .35em; text-align: center; padding: 10px 12px; color: var(--text); caret-color: var(--primary);
  background: var(--bg-2); -webkit-text-fill-color: currentColor; }
.otp-input::placeholder { color: #5d544a; letter-spacing: .35em; }

@media (max-width: 920px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-files { position: static; max-height: none; padding: 10px; }
  .settings-files a { display: none; }
  .settings-select { display: block; }
  .text-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .appearance-row { grid-template-columns: minmax(0, 1fr); }
  .code-form { flex-direction: column; }
}

/* Correcties: in kolommen niet uitrekken, en code-velden in een vaste-breedte letter */
.cfg-stack > *, .field > .cfg-string, .field > .mc-preview { flex: none; }
.cfg-stack > .cfg-text { flex: none; }
.input.mono, textarea.mono, .te-source { font-family: var(--mono); }
.field input[type=color] { width: 100%; height: 40px; padding: 3px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; }
.field > .mc-preview { margin-top: 8px; }

/* ----------------------------------------------------------------- toplijsten */

.small { font-size: 13px; }
.board-card .board-desc { margin: 12px 18px 0; color: var(--muted); font-size: 13px; }
.board-card table td { padding-top: 8px; padding-bottom: 8px; }
.rank-pos { width: 1%; text-align: right; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.rank-pos.medal-1 { color: #ffd84a; }
.rank-pos.medal-2 { color: #cdd5de; }
.rank-pos.medal-3 { color: #e0915a; }
.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check-chip input { width: 15px; height: 15px; accent-color: var(--primary); }
.check-chip:has(input:checked) { border-color: rgba(255, 200, 87, .45); background: rgba(255, 200, 87, .08); color: var(--text); }

/* ----------------------------------------------------------------- aankondigingen en prestaties */

.bc-list { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.bc-item { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.bc-item + .bc-item { padding-top: 18px; border-top: 1px solid var(--border); }
.type-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.type-chips .badge { font-size: 12px; }

/* ----------------------------------------------------------------- wereld */

.card-intro { margin: 0 0 4px; }
.world-form { margin-top: 14px; border-top: 1px solid var(--border); }
.pct-input { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pct-input .input { width: 104px; }
.pct-input > span { color: var(--muted); font-size: 14px; }
.mob-list { display: grid; gap: 8px; }
.mob-list:empty { display: none; }
.mob-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.mob-row .mob-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.mob-row .btn.icon-only { flex: none; }
.mob-add { display: flex; gap: 8px; align-items: center; }
.mob-add select { flex: 1 1 auto; width: auto; min-width: 0; }
.mob-add .btn { flex: none; }

/* ----------------------------------------------------------------- bossbars */

.bb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 92px; padding: 14px 12px 22px; border-radius: 12px;
  border: 1px solid var(--border); overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .15)), linear-gradient(180deg, #6f9fe0 0%, #9cc2ef 55%, #4f7a39 55%, #3d6a2b 100%);
}
.bb-stage.sm { min-height: 64px; padding: 12px 10px 14px; margin-bottom: 6px; position: sticky; top: 8px; z-index: 3; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8); }
.bb-stage-empty { color: rgba(255, 255, 255, .8); font-size: 13px; text-shadow: 1px 1px 0 rgba(0, 0, 0, .5); margin-top: 18px; }
.mc-bossbar { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.mc-bossbar-title {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.25; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.mc-bossbar-track {
  position: relative; width: min(100%, 364px); height: 10px; background: color-mix(in srgb, var(--bb) 32%, #101010);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55); image-rendering: pixelated;
}
.mc-bossbar-track > i {
  position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bb) 70%, #fff) 0 20%, var(--bb) 20% 80%, color-mix(in srgb, var(--bb) 70%, #000) 80%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.mc-bossbar-track[class*="s-notched"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.mc-bossbar-track.s-notched_6::after { background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 6 - 2px), rgba(0, 0, 0, .55) calc(100% / 6 - 2px) calc(100% / 6)); }
.mc-bossbar-track.s-notched_10::after { background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(0, 0, 0, .55) calc(10% - 2px) 10%); }
.mc-bossbar-track.s-notched_12::after { background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 2px), rgba(0, 0, 0, .55) calc(100% / 12 - 2px) calc(100% / 12)); }
.mc-bossbar-track.s-notched_20::after { background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 2px), rgba(0, 0, 0, .55) calc(5% - 2px) 5%); }
.bb-now-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.bb-now b { color: var(--text-2); font-family: var(--mono); font-weight: 600; }
.bb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.bb-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); min-width: 0; }
.bb-card-stage .mc-bossbar-title { font-size: 11.5px; }
.bb-card-stage { display: flex; justify-content: center; padding: 10px 8px 12px; border-radius: 9px; background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .25)), linear-gradient(135deg, #3b5a2b, #2c4a6b); overflow: hidden; }
.bb-card-info { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.bb-card-info .badge .i { width: 12px; height: 12px; }
.bb-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.bb-rotations { display: flex; flex-direction: column; gap: 12px; }
.bb-rotation { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--bg-2); display: flex; flex-direction: column; gap: 10px; }
.bb-rotation.off { opacity: .6; }
.bb-rot-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.bb-rot-head .input { flex: 1 1 180px; width: auto; min-width: 0; }
.bb-rot-head select { flex: 0 1 220px; width: auto; }
.bb-rot-bars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bb-rot-bars select { width: auto; flex: none; padding-top: 5px; padding-bottom: 5px; }
.bb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; }
.bb-chip small { color: var(--muted); font-family: var(--font); }
.bb-chip.missing { border-color: rgba(255, 107, 107, .5); color: var(--error); }
.bb-chip button { appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; padding: 0 4px; line-height: 1; border-radius: 4px; }
.bb-chip button:hover:not(:disabled) { color: var(--text); background: var(--surface-3); }
.bb-chip button:disabled { opacity: .3; cursor: default; }
.bb-rot-foot { margin-top: 12px; justify-content: space-between; }
.bb-editor .modal-body { display: flex; flex-direction: column; gap: 10px; }
.bb-editor .field-label { font-size: 13px; color: var(--text-2); font-weight: 600; margin-top: 6px; }
.bb-editor .field-label .hint, .bb-editor .field .hint { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; align-items: start; }
.bb-grid .field + .field { margin-top: 0; }
.bb-editor [hidden] { display: none !important; }
.bb-toolbar { margin-bottom: 0; }
.bb-frames { display: flex; flex-direction: column; gap: 6px; }
.bb-frame { display: flex; gap: 6px; align-items: flex-start; }
.bb-frame textarea { flex: 1; min-width: 0; min-height: 44px; resize: vertical; font-size: 13px; }
.bb-frame-tools { display: flex; gap: 2px; flex: none; }
.bb-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.bb-inline .input { width: 84px; }
.bb-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-color input { position: absolute; opacity: 0; pointer-events: none; }
.bb-color span { display: block; width: 34px; height: 22px; border-radius: 6px; background: var(--c); border: 2px solid rgba(255, 255, 255, .12); cursor: pointer; }
.bb-color input:checked + span { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 200, 87, .35); }
.bb-color input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.bb-editor .seg { align-self: flex-start; }
.bb-effect-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bb-effect-colors input[type=color] { width: 40px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; }
.bb-editor input[type=range] { accent-color: var(--primary); width: 100%; }
.bb-more { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.bb-more summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.bb-more > * + * { margin-top: 10px; }
@media (max-width: 640px) {
  .mc-bossbar-title { font-size: 12px; }
  .bb-rot-head select { flex: 1 1 100%; }
}

/* ----------------------------------------------------------------- item-limiet */

.il-table td b { font-weight: 650; }
.il-meter { margin-top: 6px; height: 4px; min-width: 60px; }
.il-help { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.il-select { width: auto; min-width: 200px; flex: none; }
.il-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.il-items li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.il-items li .mono { color: var(--primary); }
.il-items li .btn { margin-left: auto; }
.il-owners td { vertical-align: top; }
.il-owners tr.il-over td:first-child { box-shadow: inset 3px 0 0 var(--error); }
.il-profile { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.il-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.il-row a { color: var(--text); font-weight: 600; }
.il-profile .il-items { margin-top: 6px; }
.sm-badge { font-size: 11px; padding: 1px 7px; }
.il-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .il-items li .btn { margin-left: 0; }
  .il-select { min-width: 0; width: 100%; }
  /* Per speler een blok: naam en aantal boven, de nummers eronder. */
  .il-owners thead { display: none; }
  .il-owners, .il-owners tbody, .il-owners tr, .il-owners td { display: block; width: 100%; }
  .il-owners tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .il-owners tr:last-child { border-bottom: 0; }
  .il-owners td, .il-owners td.num { border: 0; padding: 4px 16px; text-align: left; }
  .il-owners tr.il-over td:first-child { box-shadow: none; }
  .il-owners tr.il-over { box-shadow: inset 3px 0 0 var(--error); }
}
.il-table tr.off td { opacity: .55; }

/* ----------------------------------------------------------------- modpack */

.alert.success { border-color: rgba(123, 228, 149, .3); background: rgba(123, 228, 149, .07); color: #bdf2c9; }
.alert .i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.mp-modes { display: grid; gap: 8px; }
.mp-mode { display: block; cursor: pointer; }
.mp-mode input { position: absolute; opacity: 0; pointer-events: none; }
.mp-mode span { display: grid; gap: 2px; padding: 11px 14px 11px 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-2); position: relative; transition: border-color .15s, background .15s; }
.mp-mode span::before { content: ''; position: absolute; left: 14px; top: 14px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); box-sizing: border-box; }
.mp-mode b { font-weight: 650; color: var(--text); }
.mp-mode small { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.mp-mode input:checked + span { border-color: var(--primary); background: var(--surface-2); }
.mp-mode input:checked + span::before { border: 4px solid var(--primary); }
.mp-mode.hard input:checked + span { border-color: var(--success); }
.mp-mode.hard input:checked + span::before { border-color: var(--success); }
.mp-mode.soft input:checked + span { border-color: var(--warning); }
.mp-mode.soft input:checked + span::before { border-color: var(--warning); }
.mp-mode input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.mp-mode input:disabled + span { cursor: default; }
.mp-mode input:disabled:not(:checked) + span { opacity: .6; }
.mp-note { margin: 12px 0 0; line-height: 1.5; }
.mp-required td b { font-weight: 650; }
.mp-required tr.mp-fixed td { color: var(--text-2); }
.mp-required .actions .btn + .btn { margin-left: 6px; }
.mp-add { border-top: 1px solid var(--border); }
.mp-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
.mp-suggest > span:first-child { flex-basis: 100%; }
.mp-suggest .te-chip { display: inline-flex; align-items: center; gap: 5px; }
.mp-suggest .te-chip .i { width: 13px; height: 13px; }
.mp-message + .mp-message { margin-top: 16px; }
.mp-message-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mp-message-head b { font-weight: 650; }
.mp-message .mc-preview { white-space: pre-wrap; }
.mp-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.mp-badges.end { justify-content: flex-end; }
.mp-exempt { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mp-exempt li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mp-first { margin-top: 0; margin-bottom: 12px; }
.mp-filter { margin-bottom: 10px; }
.mp-mods { list-style: none; margin: 0; padding: 0; display: grid; }
.mp-mods li { display: flex; align-items: center; gap: 8px 10px; padding: 7px 2px; border-bottom: 1px solid var(--border); font-size: 14px; flex-wrap: wrap; }
.mp-mods li:last-child { border-bottom: 0; }
.mp-mods li[hidden] { display: none; }
.mp-mods li.req { box-shadow: inset 3px 0 0 var(--success); padding-left: 10px; }
.mp-mod-name { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.mp-mod-version { overflow-wrap: anywhere; }
.mp-inner { margin-top: 12px; }
.mp-inner summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 6px 0; }
@media (max-width: 720px) {
  .mp-message-head { flex-wrap: wrap; }
  .mp-players td:nth-child(5) { min-width: 120px; }
}
@media (max-width: 720px) {
  /* Per speler een blok: naam en knop boven, status en wat ontbreekt eronder. */
  .mp-players thead { display: none; }
  .mp-players, .mp-players tbody { display: block; width: 100%; }
  .mp-players tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who act" "status status" "miss miss"; gap: 6px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .mp-players tr:last-child { border-bottom: 0; }
  .mp-players td { display: block; border: 0; padding: 0; }
  .mp-players td.hide-sm { display: none; }
  .mp-players td:nth-child(1) { grid-area: who; }
  .mp-players td:nth-child(2) { grid-area: status; }
  .mp-players td:nth-child(5) { grid-area: miss; font-size: 13.5px; }
  .mp-players td:nth-child(5)::before { content: 'Ontbreekt: '; color: var(--muted); }
  .mp-players td:nth-child(6) { grid-area: act; align-self: center; }
}

/* ----------------------------------------------------------------- toepassen (instellingen) */

.apply-bar {
  position: fixed; bottom: 22px; left: calc(50% + 126px); transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; max-width: calc(100vw - 32px);
  border-radius: 16px; background: rgba(33, 29, 24, .97); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5); backdrop-filter: blur(10px); animation: apply-in .22s ease-out;
}
.apply-bar[hidden] { display: none; }
.apply-text { display: grid; gap: 1px; margin-right: 8px; min-width: 0; }
.apply-text b { font-weight: 650; color: var(--text); font-size: 14px; }
.apply-text span { color: var(--text-2); font-size: 13px; }
.apply-btn {
  flex: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border-strong);
  display: grid; place-items: center; cursor: pointer; background: var(--surface-2); color: var(--text);
  transition: background .15s, border-color .15s, transform .1s;
}
.apply-btn .i { width: 22px; height: 22px; stroke-width: 2.4; }
.apply-btn:active { transform: scale(.96); }
.apply-btn.no { color: var(--error); }
.apply-btn.no:hover { background: rgba(255, 107, 107, .12); border-color: rgba(255, 107, 107, .4); }
.apply-btn.yes { color: #10220f; background: var(--success); border-color: var(--success); }
.apply-btn.yes:hover { filter: brightness(1.08); }
.apply-btn:disabled { opacity: .5; cursor: default; }
.apply-btn.busy .i { visibility: hidden; }
.apply-btn.busy { position: relative; }
.apply-btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(16, 34, 15, .35); border-top-color: #10220f; animation: spin .7s linear infinite; }
.cfg-form { padding-bottom: 90px; }
@keyframes apply-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 920px) {
  .apply-bar { left: 50%; bottom: 14px; width: calc(100vw - 32px); }
  .apply-text { flex: 1; }
}

/* ----------------------------------------------------------------- regels (boek) */

.rules-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.rules-preview { position: sticky; top: 16px; }
.rules-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.rules-tip { flex-basis: 100%; }
.rules-list { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 8px; counter-reset: rule; }
.rule-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: start; counter-increment: rule; }
.rule-row::before { content: counter(rule) "."; font-weight: 700; color: var(--primary); padding-top: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.rule-row textarea { resize: vertical; min-height: 44px; }
.rule-actions { display: flex; gap: 2px; padding-top: 4px; }
.rule-actions .btn { width: 32px; padding: 0; justify-content: center; }
.rules-more { margin-top: 14px; }
.rules-more summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.rules-more > * + * { margin-top: 10px; }
/* Het boek: een lichte bladzijde zoals in Minecraft, 14 regels */
.mc-book { display: grid; place-items: center; padding: 6px 0 10px; }
.mc-book-page {
  width: min(100%, 320px); aspect-ratio: 146 / 180; position: relative; box-sizing: border-box;
  padding: 34px 24px 20px; border-radius: 6px; color: #000;
  background: linear-gradient(90deg, rgba(120, 84, 40, .14), rgba(0, 0, 0, 0) 8%), #f6ecd2;
  border: 3px solid #8b6a3e; box-shadow: inset 0 0 0 2px #d9c69b, 0 10px 30px rgba(0, 0, 0, .45);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; text-shadow: none;
}
.mc-book-page.empty { display: grid; place-items: center; color: #8b7a5c; }
.mc-book-num { position: absolute; top: 12px; right: 18px; font-size: 11px; color: #5d4a2c; }
.mc-book-lines { display: grid; grid-template-rows: repeat(14, 1.55em); }
.mc-book-line { white-space: pre; overflow: hidden; text-overflow: clip; min-height: 1.55em; }
.mc-book-line .mc-click { text-decoration: underline; text-decoration-style: dotted; cursor: default; }
.book-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.book-nav .btn { min-width: 40px; justify-content: center; font-size: 18px; line-height: 1; }
@media (max-width: 1100px) {
  .rules-layout { grid-template-columns: minmax(0, 1fr); }
  .rules-preview { position: static; }
}
@media (max-width: 520px) {
  .mc-book-page { padding: 30px 16px 16px; font-size: 11.5px; }
}
/* ============================================================ 1v1 */
.cfg-group { margin: 18px 0 2px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cfg-group:first-child { margin-top: 0; }
.duel-number { width: 120px; flex: none; text-align: right; }
.duel-text { width: auto; min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.duel-live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.duel-players { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: start; }
.duel-player { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.duel-player-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; min-width: 0; }
.duel-player .kv { font-size: 13px; gap: 6px 12px; }
.duel-vs { align-self: center; color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.duel-hearts { color: var(--error); font-weight: 650; }
.duel-fights { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.duel-fights li { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; gap: 3px; }
.duel-fights li:last-child { border-bottom: 0; }
.duel-fight { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .duel-players { grid-template-columns: minmax(0, 1fr); }
  .duel-vs { justify-self: center; }
  .duel-number { width: 100%; text-align: left; }
  .duel-text { min-width: 0; max-width: none; width: 100%; }
}
.duel-columns { align-items: start; }
.duel-stack { display: grid; gap: 16px; min-width: 0; align-content: start; }
.duel-protection { margin-bottom: 12px; }
.duel-protection p { margin: 6px 0 0; }
