/* PindaHost - dev-paneel (zelfde stijl als het webpaneel van PindaFramework) */

: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; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; padding: 10px; }

@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 en scoreboard */

.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; }
.scoreboard-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.scoreboard-preview { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 0; }
.scoreboard-preview .seg { align-self: flex-start; }
.scoreboard-stage {
  display: flex; justify-content: flex-end; padding: 22px 16px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)), linear-gradient(135deg, #3b5a2b, #2c4a6b);
}
.mc-sidebar { font-family: var(--mono); font-size: 13px; line-height: 1.5; color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); background: rgba(0, 0, 0, .38); min-width: 190px; max-width: 100%; }
.mc-sidebar-title { text-align: center; padding: 1px 10px; background: rgba(0, 0, 0, .22); white-space: nowrap; }
.mc-sidebar-row { display: flex; gap: 16px; padding: 0 5px 0 4px; white-space: nowrap; }
.mc-sidebar-right { margin-left: auto; }
.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); }
@media (max-width: 900px) {
  .scoreboard-layout { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------- 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; }


/* ================================================================= PindaHost */

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.stack > p { margin: 0; }
.row .grow { flex: 1 1 240px; }
.row .port { flex: 0 0 120px; }
.small { font-size: 12.5px; }
.wrap { overflow-wrap: anywhere; }
.hint { color: var(--muted); font-weight: 400; }
.alert { display: flex; gap: 10px; align-items: flex-start; }
.alert > .i { margin-top: 1px; }
.alert.plain { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.alert.small { font-size: 13px; margin-top: 12px; }
.card.flat { box-shadow: none; }
.login-card .stack { text-align: left; margin-top: 18px; }
.login-card .stack .btn { margin-top: 4px; }
.manual { text-align: left; margin-top: 8px; font-size: 13.5px; }
.manual summary { cursor: pointer; color: var(--muted); }

/* setup */
.wizard { max-width: 760px; margin: 0 auto; padding: 40px 18px 60px; }
.wizard-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.wizard-brand img { width: 40px; height: 40px; }
.wizard-brand b { display: block; font-size: 18px; }
.wizard-brand span { color: var(--muted); font-size: 13px; }
.wizard-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.wizard-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.wizard-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; }
.wizard-steps b .i { width: 14px; height: 14px; }
.wizard-steps li.current { color: var(--text); border-color: rgba(255, 200, 87, .45); }
.wizard-steps li.current b { background: var(--grad); color: #1d1408; }
.wizard-steps li.done b { background: rgba(123, 228, 149, .15); color: var(--success); }
.wizard-card .card-body { padding: 24px; }
.wizard-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.choice { appearance: none; text-align: left; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover:not(:disabled) { border-color: #574c3f; background: var(--surface-3); }
.choice.chosen { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 200, 87, .14); }
.choice:disabled { opacity: .55; cursor: not-allowed; }
.choice b { font-size: 16px; }
.choice .muted { font-size: 13.5px; line-height: 1.45; }
.choice .badge { margin-top: 4px; }
.choice-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--primary); }
.note-row td { padding-top: 0; border-bottom: 1px solid var(--border); }
tr:has(+ .note-row) td { border-bottom: 0; }

/* dashboard */
.grid.services { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.service { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.service.on { border-color: rgba(123, 228, 149, .22); }
.service-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.service-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); }
.service-name { font-weight: 650; font-size: 15px; margin-top: 4px; }
.service-detail { font-size: 12.5px; overflow-wrap: anywhere; }
.service .badge { display: inline-flex; align-items: center; gap: 6px; }
.me-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }

/* databases */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.inline-form .input { flex: 1 1 180px; width: auto; }
.inline-form select { flex: 1 1 180px; width: auto; }
.chip-x { appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 0 0 4px; font: inherit; font-size: 15px; line-height: 1; }
.chip-x:hover { color: var(--error); }
.job-log { margin: 0; max-height: 50vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.secret-list dd { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.secret-value { color: var(--primary); user-select: all; }
td.actions .btn + .btn { margin-left: 4px; }

/* ================================================================= bestanden */

.alert.success { border-color: rgba(123, 228, 149, .3); background: rgba(123, 228, 149, .07); color: #bdf3ca; }
.alert:first-child { margin-top: 0; }
.fm { position: relative; }
.fm-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.fm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; font-size: 14px; }
.crumbs a, .crumbs b { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 7px; color: var(--text-2); font-weight: 600; overflow-wrap: anywhere; }
.crumbs a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.crumbs a.current, .crumbs b { color: var(--text); }
.crumbs .i { width: 16px; height: 16px; color: var(--primary); }
.crumb-sep { color: var(--border-strong); }
.fm-selbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 16px; background: rgba(255, 200, 87, .06); border-bottom: 1px solid var(--border); flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.fm-table td, .fm-table th { padding-top: 7px; padding-bottom: 7px; }
.fm-table .fm-check { width: 1%; padding-right: 0; }
.fm-check input { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: middle; }
.fm-row:hover td { background: var(--surface-2); }
.fm-row.selected td { background: rgba(255, 200, 87, .06); }
.fm-name-cell { max-width: 0; width: 70%; }
.fm-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; min-width: 0; max-width: 100%; }
.fm-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-name:hover { text-decoration: none; color: var(--primary); }
.fm-name .i { color: var(--muted); }
.fm-name .i.fm-dir { color: var(--primary); fill: rgba(255, 200, 87, .14); }
.fm-name-cell .badge { margin-left: 8px; }
.fm-drop { position: relative; min-height: 120px; }
.fm-dropzone { display: none; position: absolute; inset: 6px; border: 2px dashed var(--primary); border-radius: 12px; background: rgba(14, 12, 10, .88); color: var(--primary); font-weight: 650; align-items: center; justify-content: center; gap: 10px; z-index: 2; pointer-events: none; }
.fm-drop.over .fm-dropzone { display: flex; }
.fm-foot { padding: 10px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }

.menu { position: fixed; z-index: 60; min-width: 200px; padding: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: pop .12s ease-out; }
.menu a, .menu button { appearance: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--surface-3); text-decoration: none; }
.menu .i { width: 16px; height: 16px; color: var(--muted); }
.menu .danger, .menu .danger .i { color: var(--error); }

.uploads { position: fixed; right: 16px; bottom: 16px; z-index: 55; width: min(380px, calc(100vw - 32px)); max-height: min(60vh, 520px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.uploads-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.uploads-head b { flex: 1; }
.uploads-list { overflow-y: auto; padding: 6px 16px 10px; }
.upload-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.upload-item:last-child { border-bottom: 0; }
.upload-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.upload-item .meter { margin-top: 6px; height: 4px; }
.uploads-foot { padding: 8px 12px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* editor */
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.editor { overflow: hidden; }
.code { display: grid; grid-template-columns: auto minmax(0, 1fr); height: calc(100vh - 210px); min-height: 360px; background: #090807; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.code-gutter { overflow: hidden; border-right: 1px solid var(--border); background: #0c0b09; }
.code-lines { margin: 0; padding: 12px 10px 12px 14px; color: #4f473e; text-align: right; font: inherit; user-select: none; }
.code-area { position: relative; overflow: hidden; }
.code-hl, .code-input { position: absolute; inset: 0; margin: 0; padding: 12px 16px; font: inherit; line-height: inherit; white-space: pre; tab-size: 2; letter-spacing: normal; word-spacing: normal; }
.code-hl { overflow: hidden; pointer-events: none; color: #d9d2c6; }
.code-hl code { font: inherit; }
.code-input { width: 100%; height: 100%; border: 0; border-radius: 0; resize: none; background: transparent; color: transparent; caret-color: var(--primary); overflow: auto; outline: none; min-height: 0; box-shadow: none; }
.code-input:focus { box-shadow: none; }
.code-input::selection { background: rgba(255, 200, 87, .28); color: transparent; }
.t-key { color: #ffc857; }
.t-str { color: #9fdc8b; }
.t-num { color: #8fc5ff; }
.t-bool { color: #e98bd4; }
.t-com { color: #6d6458; font-style: italic; }
.t-pun { color: #a1968a; }
.t-attr { color: #f0a868; }
.t-kw { color: #e98bd4; }
.t-err { color: var(--error); }
.t-warn { color: var(--warning); }
.editor-status { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 4px 0; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.empty-page .i { width: 40px; height: 40px; color: var(--muted); }
.empty-page h2 { margin: 12px 0 6px; font-size: 19px; }

/* ================================================================= server */

.server-head p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server-tabs { margin-top: 20px; }
.server-tabs a { display: inline-flex; align-items: center; gap: 8px; }
.server-tabs .i { width: 16px; height: 16px; }
.stat-value .badge { font-size: 14px; padding: 4px 11px; }
.console .ok { color: var(--success); }
.console .resp { color: #ffd98a; }
.console .muted { color: var(--muted); }
.console-hint { margin-top: 8px; }
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.plugin-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.plugin-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plugin-card p { margin: 0; flex: 1; }
.plugin-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.plugin-desc { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.off td:first-child b { color: var(--muted); }
.install-form .row { align-items: stretch; }
.steps { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; }
.steps li::before { content: counter(step); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.steps li .muted { font-size: 13.5px; }
.memory-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.memory-row input[type=range] { flex: 1 1 200px; accent-color: var(--primary); }
.memory-row .pct-input .input { width: 120px; }
.website-grid { margin-bottom: 16px; }
.website-grid .kv dd a { display: inline-flex; align-items: center; gap: 6px; }
.website-grid .kv dd .i { width: 14px; height: 14px; }

@media (max-width: 700px) {
  .fm-bar { padding: 10px 12px; }
  .fm-actions .btn span { display: none; }
  .fm-name-cell { width: auto; }
  .code { height: calc(100vh - 230px); font-size: 12.5px; }
  .code-lines { padding-left: 8px; padding-right: 6px; }
  .code-hl, .code-input { padding: 12px 10px; }
  .editor-status { gap: 10px; }
  .server-head .page-actions { width: 100%; }
  .server-head .page-actions .btn { flex: 1 1 auto; }
}
.grid.server-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 640px) {
  .grid.server-stats { grid-template-columns: 1fr 1fr; }
}
