/* Orbit IT: donkere "chrome" (zijbalk/kop) zoals orbitit.be, oranje uit het logo als accent. */
:root {
    --bg: #f7f5f1;
    --panel: #ffffff;
    --text: #1e1b16;
    --muted: #6f6a60;
    --line: #e4dfd6;
    --accent: #ff7518;          /* vlakken: knoppen, actieve tab */
    --on-accent: #16140f;       /* tekst op oranje */
    --link: #b84f08;            /* oranje dat leesbaar is als tekst op licht */
    --accent-soft: #fff0e5;
    --chrome: #16140f;          /* zijbalk en kop, kleur van orbitit.be */
    --chrome-text: #f3efe8;
    --chrome-muted: #a39d92;
    --chrome-hover: #26231c;
    --ok: #1a7f37;
    --ok-soft: #e6f4ea;
    --error: #c62828;
    --error-soft: #fdecea;
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12110d;
        --panel: #1d1b16;
        --text: #ece8e0;
        --muted: #a39d92;
        --line: #322e26;
        --accent: #ff7a22;
        --on-accent: #16140f;
        --link: #ff9a57;
        --accent-soft: #33220f;
        --chrome: #0c0b08;
        --chrome-hover: #1f1c16;
        --ok: #4ac26b;
        --ok-soft: #16281c;
        --error: #ff6b6b;
        --error-soft: #2e1a1a;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { display: flex; min-height: 100vh; }

.side {
    width: 230px;
    flex-shrink: 0;
    background: var(--chrome);
    color: var(--chrome-text);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand { padding: 4px 10px 24px; display: block; }
.brand img { display: block; width: 150px; height: auto; }

.side a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--chrome-text);
}
.side a:hover { background: var(--chrome-hover); text-decoration: none; }
.side a.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.side .brand:hover { background: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.top .spacer { flex: 1; }

.impersonation {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--accent-soft);
    padding: 6px 12px;
    border-radius: var(--radius);
}

.content { padding: 24px; max-width: 1200px; }

h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 32px 0 12px; }

.lead { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.notice {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
}
.notice.ok { background: var(--ok-soft); border-color: var(--ok); }
.notice.error { background: var(--error-soft); border-color: var(--error); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin: 16px 0; }
.tile {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
}
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile-value { font-size: 28px; font-weight: 700; }
.tile-label { color: var(--muted); }

.grid {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.grid th, .grid td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid th { font-size: 13px; color: var(--muted); font-weight: 600; }
.grid tr.failed td { color: var(--error); }
.grid .actions { white-space: nowrap; display: flex; gap: 8px; align-items: center; }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form .row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

input, select {
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button {
    font: inherit;
    cursor: pointer;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 14px;
}
button:disabled { opacity: 0.6; cursor: default; }
button.link { background: none; border: none; color: var(--link); padding: 0; font-weight: 400; }

form.inline { display: inline; margin: 0; }

.validation-message, .validation-errors { color: var(--error); font-size: 13px; }

code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

@media (max-width: 720px) {
    .shell { flex-direction: column; }
    .side { width: auto; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); }
    .brand { padding: 4px 10px 12px; width: 100%; }
    .brand img { width: 120px; }
    .content { padding: 16px; }
    .grid { display: block; overflow-x: auto; }
}

.row-buttons { display: flex; gap: 16px; align-items: center; }
.grid tr.editing td { background: var(--accent-soft); }
select:disabled, input:disabled { opacity: 0.6; }

button.danger { background: var(--error); border-color: var(--error); color: #fff; }
button.link.danger-link { color: var(--error); }
.confirm { font-size: 13px; color: var(--error); font-weight: 600; }
.grid tr.ended td { color: var(--muted); }

/* ---------- Aanmeld- en accountpagina's ---------- */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 24px; background: var(--chrome); color: var(--chrome-text);
}
.auth-brand img { display: block; height: 36px; width: auto; }
.auth-top a, .auth-top button.link { color: var(--chrome-text); }
.auth-top a:hover, .auth-top button.link:hover { color: var(--accent); text-decoration: none; }
.auth-user { display: flex; align-items: center; gap: 16px; }
.auth-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 32px 16px; }
.auth-foot {
    text-align: center; font-size: 13px; padding: 20px 16px;
    background: var(--chrome); color: var(--chrome-muted);
    display: flex; flex-direction: column; gap: 4px;
}
.auth-foot p { margin: 0; }
.auth-foot a { color: var(--chrome-text); }
.auth-foot a:hover { color: var(--accent); text-decoration: none; }
.auth-foot span { margin: 0 8px; }
.auth-foot .tagline { color: var(--accent); font-weight: 600; }

.auth-card {
    max-width: 420px; margin: 24px auto; padding: 28px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    display: flex; flex-direction: column; gap: 12px;
}
.auth-card h1 { margin: 0; }
.auth-card { border-top: 4px solid var(--accent); }
.auth-card .form { max-width: none; }
.auth-card p { margin: 0; }

.form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.form label.check input { width: auto; }
input.code { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: 0.2em; }
button.wide { width: 100%; padding: 10px 14px; }

a.button {
    display: inline-block; padding: 6px 14px; border-radius: 6px;
    background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font-weight: 600;
}
a.button:hover { text-decoration: none; filter: brightness(1.05); }
a.button.secondary, button.secondary { background: var(--panel); color: var(--link); border-color: var(--line); }
a.button.danger-outline { background: var(--panel); color: var(--error); border-color: var(--error); }
.action-list { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }

.manage { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.manage-nav { display: flex; flex-direction: column; gap: 4px; }
.manage-nav h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px 10px; }
.manage-nav a { padding: 8px 10px; border-radius: 8px; color: var(--text); }
.manage-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.manage-nav a.active { background: var(--accent-soft); color: var(--link); font-weight: 600; }
.manage-body { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.manage-body h1 { margin: 0 0 4px; }
.manage-body p { margin: 0; max-width: 65ch; }

.steps { display: flex; flex-direction: column; gap: 20px; padding-left: 20px; max-width: 65ch; }
.steps li { padding-left: 4px; }
.steps .form { margin-top: 8px; }
.qr { margin: 12px 0; width: 220px; max-width: 100%; padding: 12px; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
code.key { font-size: 15px; padding: 2px 6px; background: var(--accent-soft); border-radius: 4px; word-break: break-all; }
details summary { cursor: pointer; color: var(--link); }

.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-width: 520px; }
.recovery-codes code {
    font-size: 15px; padding: 8px 10px; text-align: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
}

@media (max-width: 720px) {
    .manage { grid-template-columns: 1fr; gap: 16px; }
    .manage-nav { flex-direction: row; flex-wrap: wrap; }
    .manage-nav h2 { width: 100%; }
    .auth-card { padding: 20px; margin: 8px auto; }
}

/* ---------- VPN ---------- */
.keybox {
    background: var(--panel); border: 1px solid var(--accent); border-radius: 12px;
    padding: 20px; margin: 16px 0; display: flex; flex-direction: column; gap: 8px;
}
.keybox-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.keybox h2 { margin: 0; }
.keybox h3 { margin: 12px 0 0; font-size: 15px; }
.keybox code.key { font-size: 14px; display: block; padding: 10px; user-select: all; }
pre {
    font-family: ui-monospace, Consolas, monospace; font-size: 13px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
    padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 6px 0;
}
.vpn-user {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px;
}
.vpn-user-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.vpn-user .grid { border: none; }
.vpn-user .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.register-box { background: var(--bg); border-radius: var(--radius); padding: 12px; }
.register-box .row-buttons { flex-wrap: wrap; }
input.grow { flex: 1; min-width: 220px; }
.routes { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.routes label.check { display: flex; gap: 8px; align-items: center; }
.pill-ok { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
label.check { display: flex; gap: 8px; align-items: center; }
input.qty { width: 90px; }
.small-gap { margin-left: 8px; }

/* ---------- Domeinen ---------- */
.search-row { max-width: 560px; }
.search-result {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.search-result.ok { border-color: var(--ok); }
.search-result .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.domain-manage { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }

/* ---------- Prijslijst domeinen ---------- */
:root { --warn: #9a6200; --warn-soft: #fff5db; }
@media (prefers-color-scheme: dark) { :root { --warn: #f0b84a; --warn-soft: #2e2510; } }

.price-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.price-summary > div {
    display: flex; flex-direction: column; gap: 2px; min-width: 180px;
    padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.price-summary > div strong { font-size: 18px; }
.price-summary > div button { align-self: flex-start; }
.price-summary > div.loss { border-color: var(--error); background: var(--error-soft); }
.price-summary > div.loss strong { color: var(--error); }

.price-tools { margin: 16px 0; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.price-tools summary { cursor: pointer; font-weight: 600; }
.price-tools h3 { font-size: 15px; margin: 18px 0 4px; }
.rule-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.rule-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.rule-row input { width: 110px; }
.import-preview { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.import-preview .grid { max-height: 420px; overflow-y: auto; display: block; }
.loss-text { color: var(--error); font-weight: 600; }

.filter-row { margin: 16px 0 8px; flex-wrap: wrap; }
.filter-row input { min-width: 200px; }

.grid tr.loss td { background: var(--error-soft); }
.grid.compact th, .grid.compact td { padding: 4px 10px; }
.price-cell { display: flex; flex-direction: column; line-height: 1.3; }
.price-cell .sell { font-weight: 600; }
.price-cell .cost { font-size: 12px; color: var(--muted); }
.price-cell.thin .cost { color: var(--warn); }
.price-cell.loss .sell, .price-cell.loss .cost { color: var(--error); }
.changed { color: var(--warn); }
.notice.warn { background: var(--warn-soft); border-color: var(--warn); }
.price-form { display: grid; grid-template-columns: auto 120px 120px auto; gap: 8px 12px; align-items: center; }
.price-form input { width: 100%; }
.inline-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 8px; max-width: 420px; }
.order-panel { margin-top: 12px; padding: 14px; border: 1px solid var(--ok); border-radius: var(--radius); background: var(--bg); max-width: 640px; }
.domain-manage h3 { font-size: 14px; margin: 8px 0 0; }
.glue-form, .contact-form { flex-wrap: wrap; align-items: flex-end; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.c { display: contents; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--link); white-space: nowrap; }
.badge.bad { background: var(--error-soft); color: var(--error); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 8px;
    background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); }
.batches { margin: 16px 0; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.settings-grid { display: flex; flex-direction: column; gap: 24px; }
.m0 { margin: 0; }

/* Melding als de verbinding met de server wegvalt (Blazor zet de klassen components-reconnect-*). */
.reconnect-modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .35); align-items: center; justify-content: center; }
.reconnect-modal.components-reconnect-show,
.reconnect-modal.components-reconnect-retrying,
.reconnect-modal.components-reconnect-failed,
.reconnect-modal.components-reconnect-rejected,
.reconnect-modal.components-reconnect-paused,
.reconnect-modal.components-reconnect-resume-failed { display: flex; }
.reconnect-box { background: var(--panel); color: var(--text); padding: 20px 24px; border-radius: var(--radius); border: 1px solid var(--line); max-width: 360px; }
.reconnect-box p { margin: 0; }
.reconnect-failed { display: none; }
.reconnect-modal.components-reconnect-failed .reconnect-failed,
.reconnect-modal.components-reconnect-rejected .reconnect-failed,
.reconnect-modal.components-reconnect-resume-failed .reconnect-failed { display: block; }
.reconnect-modal.components-reconnect-failed .reconnect-busy,
.reconnect-modal.components-reconnect-rejected .reconnect-busy,
.reconnect-modal.components-reconnect-resume-failed .reconnect-busy { display: none; }

/* ---------- DNS ---------- */
.dns-value { word-break: break-all; max-width: 520px; }
.dns-name { display: flex; align-items: center; gap: 6px; }
.dns-name input { flex: 1; min-width: 0; }
.dns-form { max-width: 640px; }

/* ---------- kopieerknop ---------- */
.copy-block { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.copy-block pre, .copy-block code.key { flex: 1; min-width: 0; margin: 0; }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 12px; font-weight: 500;
            background: var(--panel); color: var(--link); border: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.copy-btn:hover { border-color: var(--accent); }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }
.copy-btn svg { display: block; }

/* ---------- hosting ---------- */
.hosting h3 { margin: 16px 0 8px; font-size: 15px; }
.usage { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
progress.usage-bar { width: 220px; height: 8px; appearance: none; border: none; border-radius: 999px; background: var(--line); overflow: hidden; }
progress.usage-bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.usage-bar::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
progress.usage-bar::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
progress.usage-bar.warn::-webkit-progress-value { background: var(--warn); }
progress.usage-bar.warn::-moz-progress-bar { background: var(--warn); }
progress.usage-bar.bad::-webkit-progress-value { background: var(--error); }
progress.usage-bar.bad::-moz-progress-bar { background: var(--error); }

/* ---------- bestandsbeheer en logs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; margin-bottom: 8px; }
.grid.files td { padding-top: 6px; padding-bottom: 6px; }
button.link.file-dir { font-weight: 600; }
pre.log { max-height: 70vh; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* ---------- ASP.NET-apps en SFTP ---------- */
textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); width: 100%; box-sizing: border-box; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.form.wide { max-width: 760px; }
.app-status { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 8px 0 12px; }
.app-status .state { font-weight: 600; }
.app-status .state.ok { color: var(--ok); }
.app-status .state.bad { color: var(--error); }
.app-status .state.warn { color: var(--warn); }
pre.problem { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 6px 0 0; }
ol.steps-list { padding-left: 20px; }
ol.steps-list li { margin-bottom: 6px; }
