/* Kite.now huisstijl. Fonts en kleuren staan in variabelen: pas hier aan als de Kitemedia-fonts bekend zijn. */
:root {
  --font-head: 'Archivo', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ink: #0b0b0b;          /* zwart: tekst, zijbalk */
  --ink-2: #3d3d3d;
  --muted: #646464;        /* secundaire tekst op wit (5.9:1) */
  --line: #e2e2df;
  --surface: #ffffff;
  --ground: #f3f3f0;
  --dark: #0b0b0b;
  --dark-2: #171717;
  --dark-3: #262626;
  --dark-text: #f2f2f2;
  --dark-muted: #a3a3a3;
  --lilac: #d4a2f8;        /* iconen en kleine tekst op donker */
  --green: #00ff00;        /* details op donker en belangrijkste actieknoppen (met zwarte tekst) */
  --green-ink: #0b0b0b;

  /* statuskleuren, apart van de merkaccenten en altijd met tekst of icoon */
  --ok-bg: #e6f6e6; --ok: #11621a;
  --warn-bg: #fff3d6; --warn: #7a4b00;
  --bad-bg: #fde4e4; --bad: #a3141b;
  --off-bg: #ececea; --off: #4a4a4a;

  --radius: 14px;
  --radius-s: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); color: var(--ink); background: var(--ground); font-size: 15px; line-height: 1.5; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; }
code, .mono { font-family: var(--font-mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 240px; max-width: 100%; background: var(--dark); color: var(--dark-text); padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; }
.main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 900px) { .side { max-width: 260px; } }

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--dark-3); display: grid; place-items: center; }
.brand-name { font-family: var(--font-head); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; text-transform: uppercase; }
.brand-name span { color: var(--green); text-transform: none; }
.brand-sub { font-size: 12px; color: var(--lilac); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lilac); padding: 12px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-s); color: #d6d6d6; text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a svg { color: var(--lilac); flex: none; }
.nav a:hover { background: var(--dark-2); color: #fff; }
.nav a.on { background: var(--dark-3); color: #fff; box-shadow: inset 3px 0 0 var(--green); }
.side-foot { margin-top: auto; padding: 14px; border-radius: var(--radius); background: var(--dark-2); font-size: 13px; color: var(--dark-muted); display: flex; flex-direction: column; gap: 8px; }
.side-foot b { color: #fff; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 28px; background: var(--dark); color: #fff; min-height: 64px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.crumbs a { color: var(--lilac); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: #6b6b6b; }
.top .grow { flex: 1 1 auto; }
.content { padding: 28px; display: flex; flex-direction: column; gap: 24px; max-width: 1400px; width: 100%; }
@media (max-width: 600px) { .content { padding: 16px; } .top { padding: 12px 16px; } }

/* ---------- Typografie ---------- */
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 32px; font-weight: 900; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
.lead { color: var(--muted); margin: 4px 0 0; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.page-head > div:first-child { flex: 1 1 320px; }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.primary:hover { background: #2dff2d; color: var(--green-ink); box-shadow: 0 0 0 3px rgba(0,255,0,.25); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #2a2a2a; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.top .btn { border-color: #3a3a3a; background: transparent; color: #fff; }
.top .btn:hover { background: var(--dark-3); }
.top .btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* ---------- Kaarten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.dark { background: var(--dark); color: var(--dark-text); border-color: var(--dark); }
.card.dark .muted { color: var(--dark-muted); }
.card.dark .eyebrow { color: var(--lilac); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.tight { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > .wide { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cols > .narrow { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-of-type { border-top: 0; }
.kv > span:first-child { color: var(--muted); }
.kv > b, .kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.card.dark .kv { border-color: var(--dark-3); }
.card.dark .kv > span:first-child { color: var(--dark-muted); }

/* ---------- Stat-tegels ---------- */
.stat { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); }
.stat .value { font-family: var(--font-head); font-size: 34px; font-weight: 900; letter-spacing: -0.03em; }
.stat .sub { font-size: 13px; color: var(--dark-muted); }
.meter { height: 6px; background: var(--dark-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.meter.warn > i { background: #ffc94d; }
.meter.bad > i { background: #ff6b6b; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.off { background: var(--off-bg); color: var(--off); }
.badge.neon { background: var(--dark); color: var(--green); }
.badge.lilac { background: var(--dark); color: var(--lilac); }

/* ---------- Formulieren ---------- */
.form { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .flabel { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.field .help { font-size: 12px; color: var(--muted); line-height: 1.45; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; border: 1px solid #cfcfcb; border-radius: var(--radius-s); padding: 0 14px; background: #fff; }
textarea.input { padding: 10px 14px; min-height: 90px; font-family: var(--font-mono); font-size: 13px; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(212,162,248,.55); }
.input-unit { display: flex; align-items: stretch; }
.input-unit .input { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.input-unit .unit { display: grid; place-items: center; padding: 0 12px; border: 1px solid #cfcfcb; border-left: 0; border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--ground); font-size: 12px; font-weight: 700; color: var(--muted); }
.copy { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 14px; background: var(--ground); border-radius: var(--radius-s); font-family: var(--font-mono); font-size: 13px; min-width: 0; }
.copy span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy button { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.copy button:hover { background: #e4e4e0; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch-row:first-child { border-top: 0; }
.switch-row .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row .txt b { font-size: 14px; }
.switch-row .txt span { font-size: 12px; color: var(--muted); }
.switch { flex: none; width: 48px; height: 28px; border-radius: 99px; border: 0; background: #b9b9b5; position: relative; cursor: pointer; padding: 0; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { left: 24px; background: var(--green); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs a { flex: none; display: flex; align-items: center; min-height: 48px; padding: 0 16px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- App-layout met zijmenu (zoals Cloudways) ---------- */
.app-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.app-menu { flex: 1 1 230px; max-width: 100%; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
@media (min-width: 900px) { .app-menu { max-width: 250px; position: sticky; top: 16px; } }
.app-menu a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-s); text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.app-menu a svg { flex: none; color: var(--ink-2); }
.app-menu a:hover { background: var(--ground); }
.app-menu a.on { background: var(--ink); color: #fff; }
.app-menu a.on svg { color: var(--lilac); }
.app-body { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fafaf8; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
td .sub { font-size: 12px; color: var(--muted); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ink); }

/* ---------- Serverkaarten ---------- */
.server-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.server-card .head { background: var(--dark); color: #fff; padding: 18px 20px; display: flex; gap: 12px; align-items: flex-start; }
.server-card .head .ico { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--dark-3); color: var(--green); display: grid; place-items: center; }
.server-card .head .meta { flex: 1; min-width: 0; }
.server-card .head .meta div { font-size: 13px; color: var(--lilac); font-family: var(--font-mono); }
.server-card .body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.server-card .apps { display: flex; flex-direction: column; gap: 6px; }
.server-card .apps a { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-s); background: var(--ground); text-decoration: none; font-weight: 600; font-size: 14px; }
.server-card .apps a:hover { background: #e7e7e3; }
.server-card .apps a span:last-child { font-size: 12px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; text-align: right; }
.mini-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: 12px; }
.mini-meters .meter { background: #e4e4e0; }
.mini-meters .meter > i { background: var(--ink); }
.add-card { border: 2px dashed #c9c9c4; border-radius: var(--radius); min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-decoration: none; text-align: center; padding: 20px; font-weight: 800; }
.add-card:hover { border-color: var(--ink); background: #fff; }
.add-card .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--green); display: grid; place-items: center; color: var(--ink); }

/* ---------- Grafieken ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: #2b2b2b; stroke-width: 1; }
.chart .axis-text { fill: var(--dark-muted); font-size: 11px; font-family: var(--font-body); }
.chart .hair { stroke: #8a8a8a; stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.35); min-width: 140px; z-index: 5; }
.chart-tip .t { color: var(--muted); margin-bottom: 4px; }
.chart-tip .r { display: flex; align-items: center; gap: 8px; }
.chart-tip .r i { width: 14px; height: 0; border-top: 2px solid; }
.chart-tip .r b { font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--dark-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 0; border-top: 2px solid; }
.legend i.dash { border-top-style: dashed; }
.range { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.range button { border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.range button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Terminal / logboek ---------- */
.terminal { background: var(--dark); color: #d9d9d9; border-radius: var(--radius); padding: 16px 18px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 460px; overflow: auto; margin: 0; }
.terminal .ts { color: var(--lilac); }
.terminal .err { color: #ff8f8f; }
.terminal .done { color: var(--green); }

/* ---------- Stappen in lanceerwizard ---------- */
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-s); font-weight: 600; font-size: 14px; color: var(--muted); }
.step .n { width: 28px; height: 28px; flex: none; border-radius: 50%; background: #e3e3df; color: var(--ink-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.step.on { background: var(--dark); color: #fff; }
.step.on .n { background: var(--green); color: var(--ink); }
.step.done .n { background: var(--ink); color: var(--green); }

/* ---------- Modal en meldingen ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(11,11,11,.6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 18px; padding: 24px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.modal.wide { width: min(860px, 100%); }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { background: var(--dark); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; gap: 10px; align-items: center; max-width: 440px; }
.toast svg { color: var(--green); flex: none; }
.toast.err svg { color: #ff8f8f; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 20px 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-s); background: var(--dark); color: var(--dark-text); font-size: 14px; }
.notice svg { color: var(--lilac); flex: none; margin-top: 2px; }
.notice.light { background: #f7f0fe; color: var(--ink); border: 1px solid #e7d3fb; }
.notice.light svg { color: #7a3cb0; }
.notice.error { background: var(--bad-bg); color: var(--bad); }
.notice.error svg { color: var(--bad); }

/* ---------- Inloggen ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--dark); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.login-card .brand { color: var(--ink); padding: 0; }
.login-card .brand-mark { background: var(--dark); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--font-mono); font-size: 12px; background: var(--ground); padding: 5px 9px; border-radius: 8px; }
.card.dark .chip { background: var(--dark-3); color: var(--lilac); }
.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-list .item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; }
.bar-list .item .b { grid-column: 1 / -1; height: 6px; background: var(--dark-3); border-radius: 99px; overflow: hidden; }
.bar-list .item .b i { display: block; height: 100%; background: var(--lilac); border-radius: 99px; }
.bar-list .item span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }

/* schakelaar op donkere ondergrond */
.card.dark .switch { background: #4a4a4a; }
.card.dark .switch[aria-checked="true"] { background: var(--dark-3); box-shadow: inset 0 0 0 1px #3d3d3d; }
.card.dark .btn { border-color: #3a3a3a; background: transparent; color: #fff; }
.card.dark .btn:hover { background: var(--dark-3); }
.card.dark .btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.card.dark .btn.primary:hover { background: #2dff2d; }

/* compacte navigatie op kleine schermen */
@media (max-width: 899px) {
  .side { padding: 14px 16px; gap: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-label, .side-foot > div:nth-child(2) { display: none; }
  .side-foot { flex-direction: row; align-items: center; justify-content: space-between; padding: 10px 12px; }
}
