/* NovaCMS – Adminbereich
   ------------------------------------------------------------------ */

:root {
    --nv-accent: #3b6fff;
    --nv-radius: 12px;
    --nv-radius-sm: 8px;
    --nv-sidebar: 256px;
    --nv-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --nv-ok: #2fbf71;
    --nv-warn: #e0982c;
    --nv-err: #e2574c;
}

/* Helles Schema */
:root,
html[data-mode="light"],
html[data-theme="light"] {
    --nv-bg: #f1f4fa;
    --nv-surface: #ffffff;
    --nv-surface-2: #f7f9fd;
    --nv-sidebar-bg: #141b29;
    --nv-sidebar-text: #aab5cc;
    --nv-line: #e3e8f2;
    --nv-text: #18202f;
    --nv-text-soft: #5d6880;
    --nv-accent-soft: rgba(59, 111, 255, .10);
    --nv-shadow: 0 8px 26px rgba(20, 30, 55, .08);
}

/* Dunkles Schema */
html[data-theme="dark"] {
    --nv-bg: #0d121c;
    --nv-surface: #151d2b;
    --nv-surface-2: #1a2333;
    --nv-sidebar-bg: #101724;
    --nv-sidebar-text: #93a0ba;
    --nv-line: #25304a;
    --nv-text: #e7ecf8;
    --nv-text-soft: #94a1bc;
    --nv-accent-soft: rgba(59, 111, 255, .18);
    --nv-shadow: 0 10px 34px rgba(0, 0, 0, .40);
}

@media (prefers-color-scheme: dark) {
    html[data-mode="auto"]:not([data-theme]) {
        --nv-bg: #0d121c;
        --nv-surface: #151d2b;
        --nv-surface-2: #1a2333;
        --nv-sidebar-bg: #101724;
        --nv-sidebar-text: #93a0ba;
        --nv-line: #25304a;
        --nv-text: #e7ecf8;
        --nv-text-soft: #94a1bc;
        --nv-accent-soft: rgba(59, 111, 255, .18);
        --nv-shadow: 0 10px 34px rgba(0, 0, 0, .40);
    }
}

html[data-mode="dark"]:not([data-theme]) {
    --nv-bg: #0d121c;
    --nv-surface: #151d2b;
    --nv-surface-2: #1a2333;
    --nv-sidebar-bg: #101724;
    --nv-sidebar-text: #93a0ba;
    --nv-line: #25304a;
    --nv-text: #e7ecf8;
    --nv-text-soft: #94a1bc;
    --nv-accent-soft: rgba(59, 111, 255, .18);
    --nv-shadow: 0 10px 34px rgba(0, 0, 0, .40);
}

* { box-sizing: border-box; }

body.nv-body {
    margin: 0;
    background: var(--nv-bg);
    color: var(--nv-text);
    font: 15px/1.6 var(--nv-font);
    -webkit-font-smoothing: antialiased;
}

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

/* ---------------------------------------------------------- Seitenleiste */
.nv-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--nv-sidebar);
    background: var(--nv-sidebar-bg);
    color: var(--nv-sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.nv-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
}

.nv-logo { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 700; }
.nv-logo:hover { text-decoration: none; }
.nv-logo-text { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

.nv-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--nv-accent), #7d4bff);
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}
.nv-logo-mark-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 24px; margin: 0 auto 14px; }

.nv-sidebar-close { display: none; background: none; border: none; color: inherit; cursor: pointer; }

.nv-nav { flex: 1; overflow-y: auto; padding: 6px 12px 20px; }

.nv-nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #5f6c86;
    padding: 16px 10px 7px;
    font-weight: 700;
}

.nv-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--nv-radius-sm);
    color: var(--nv-sidebar-text);
    font-size: 14px;
    margin-bottom: 2px;
}
.nv-nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nv-nav-item.is-active { background: var(--nv-accent); color: #fff; }
.nv-nav-item .nv-icon { flex-shrink: 0; opacity: .9; }

.nv-sidebar-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.nv-version { font-size: 11px; color: #5f6c86; padding: 8px 11px 2px; }

/* --------------------------------------------------------- Hauptbereich */
.nv-main { margin-left: var(--nv-sidebar); min-height: 100vh; display: flex; flex-direction: column; }

.nv-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--nv-surface);
    border-bottom: 1px solid var(--nv-line);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    height: 62px;
}

.nv-topbar-title { font-weight: 600; font-size: 15px; flex: 1; }
.nv-topbar-actions { display: flex; align-items: center; gap: 10px; }

.nv-burger { display: none; background: none; border: none; color: var(--nv-text); cursor: pointer; padding: 6px; }

.nv-icon-btn {
    background: var(--nv-surface-2);
    border: 1px solid var(--nv-line);
    color: var(--nv-text);
    border-radius: var(--nv-radius-sm);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 15px;
}
.nv-icon-btn:hover { border-color: var(--nv-accent); }

.nv-user-menu { position: relative; }

.nv-user-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--nv-surface-2);
    border: 1px solid var(--nv-line);
    border-radius: 30px;
    padding: 4px 14px 4px 4px;
    cursor: pointer;
    color: var(--nv-text);
    font: inherit;
    font-size: 14px;
}
.nv-user-btn:hover { border-color: var(--nv-accent); }

.nv-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--nv-accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

.nv-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--nv-surface);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius);
    box-shadow: var(--nv-shadow);
    padding: 6px;
    display: none;
}
.nv-dropdown.is-open { display: block; }
.nv-dropdown a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: var(--nv-radius-sm);
    color: var(--nv-text);
    font-size: 14px;
}
.nv-dropdown a:hover { background: var(--nv-surface-2); text-decoration: none; }
.nv-dropdown a.nv-danger { color: var(--nv-err); }

.nv-content { flex: 1; padding: 26px 22px 40px; max-width: 1400px; width: 100%; }

.nv-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px 22px;
    color: var(--nv-text-soft);
    font-size: 12px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------ Bausteine */
.nv-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.nv-page-head h1 { margin: 0; font-size: 22px; }
.nv-page-sub { margin: 5px 0 0; color: var(--nv-text-soft); font-size: 14px; }
.nv-page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.nv-card {
    background: var(--nv-surface);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius);
    box-shadow: var(--nv-shadow);
    padding: 22px;
    margin-bottom: 20px;
}
.nv-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -4px 0 16px;
    flex-wrap: wrap;
}
.nv-card-head h2 { margin: 0; font-size: 16px; }
.nv-card-sub { color: var(--nv-text-soft); font-size: 13px; margin: 3px 0 0; }

.nv-grid { display: grid; gap: 20px; }
.nv-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.nv-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nv-grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.nv-stat {
    background: var(--nv-surface);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius);
    box-shadow: var(--nv-shadow);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.nv-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--nv-accent-soft);
    color: var(--nv-accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.nv-stat-body { display: flex; flex-direction: column; min-width: 0; }
.nv-stat-label { font-size: 12px; color: var(--nv-text-soft); text-transform: uppercase; letter-spacing: .05em; }
.nv-stat-value { font-size: 20px; font-weight: 700; }
.nv-stat-hint { font-size: 12px; color: var(--nv-text-soft); }

/* --------------------------------------------------------------- Tabelle */
.nv-table-wrap { overflow-x: auto; margin: 0 -4px; }

table.nv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.nv-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--nv-text-soft);
    border-bottom: 1px solid var(--nv-line);
    white-space: nowrap;
}
table.nv-table td { padding: 11px 12px; border-bottom: 1px solid var(--nv-line); vertical-align: middle; }
table.nv-table tbody tr:hover { background: var(--nv-surface-2); }
table.nv-table tr:last-child td { border-bottom: none; }
.nv-table .nv-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.nv-cell-main { font-weight: 600; }
.nv-cell-sub { color: var(--nv-text-soft); font-size: 12px; }
.nv-nowrap { white-space: nowrap; }

/* -------------------------------------------------------------- Buttons */
.nv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--nv-radius-sm);
    border: 1px solid var(--nv-line);
    background: var(--nv-surface);
    color: var(--nv-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.nv-btn:hover { border-color: var(--nv-accent); text-decoration: none; }
.nv-btn-primary { background: var(--nv-accent); border-color: transparent; color: #fff; font-weight: 600; }
.nv-btn-primary:hover { filter: brightness(1.08); }
.nv-btn-danger { color: var(--nv-err); border-color: rgba(226, 87, 76, .35); }
.nv-btn-danger:hover { background: rgba(226, 87, 76, .1); border-color: var(--nv-err); }
.nv-btn-sm { padding: 6px 11px; font-size: 13px; }
.nv-btn-block { width: 100%; }
.nv-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* -------------------------------------------------------------- Formular */
.nv-field { margin-bottom: 16px; }
.nv-field > label,
.nv-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--nv-text-soft);
}

.nv-field input[type="text"],
.nv-field input[type="email"],
.nv-field input[type="url"],
.nv-field input[type="password"],
.nv-field input[type="number"],
.nv-field input[type="date"],
.nv-field input[type="search"],
.nv-field input[type="file"],
.nv-field select,
.nv-field textarea,
.nv-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--nv-radius-sm);
    border: 1px solid var(--nv-line);
    background: var(--nv-surface-2);
    color: var(--nv-text);
    font: inherit;
    font-size: 14px;
}

.nv-field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.nv-field textarea.nv-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

.nv-field input:focus,
.nv-field select:focus,
.nv-field textarea:focus,
.nv-input:focus {
    outline: none;
    border-color: var(--nv-accent);
    box-shadow: 0 0 0 3px var(--nv-accent-soft);
}

.nv-field input[type="color"] { width: 64px; height: 40px; padding: 3px; }

.nv-hint { font-size: 12px; color: var(--nv-text-soft); margin-top: 5px; }

.nv-check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin-bottom: 8px; cursor: pointer; }
.nv-check input { width: 16px; height: 16px; accent-color: var(--nv-accent); }

.nv-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }

.nv-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid var(--nv-line);
    margin-top: 18px;
    padding-top: 18px;
}

.nv-group-picker {
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-sm);
    padding: 12px;
    margin-top: 9px;
    background: var(--nv-surface-2);
}
.nv-hidden { display: none !important; }

/* --------------------------------------------------------------- Hinweise */
.nv-alert {
    padding: 13px 16px;
    border-radius: var(--nv-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}
.nv-alert-success { background: rgba(47, 191, 113, .12); color: #1f9a58; border-color: rgba(47, 191, 113, .3); }
.nv-alert-error   { background: rgba(226, 87, 76, .12); color: #cf4034; border-color: rgba(226, 87, 76, .3); }
.nv-alert-warning { background: rgba(224, 152, 44, .14); color: #b9781a; border-color: rgba(224, 152, 44, .3); }
.nv-alert-info    { background: var(--nv-accent-soft); color: var(--nv-text); border-color: var(--nv-line); }

html[data-theme="dark"] .nv-alert-success { color: #61d99a; }
html[data-theme="dark"] .nv-alert-error { color: #ff8478; }
html[data-theme="dark"] .nv-alert-warning { color: #f0b95f; }

.nv-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    background: var(--nv-surface-2);
    color: var(--nv-text-soft);
    border: 1px solid var(--nv-line);
}
.nv-badge-success { background: rgba(47, 191, 113, .14); color: #1f9a58; border-color: transparent; }
.nv-badge-danger  { background: rgba(226, 87, 76, .14); color: #cf4034; border-color: transparent; }
.nv-badge-warning { background: rgba(224, 152, 44, .16); color: #b9781a; border-color: transparent; }
.nv-badge-info    { background: var(--nv-accent-soft); color: var(--nv-accent); border-color: transparent; }

.nv-empty { text-align: center; padding: 40px 20px; color: var(--nv-text-soft); }
.nv-empty svg { opacity: .4; margin-bottom: 10px; }

/* ------------------------------------------------------------ Tabs/Filter */
.nv-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--nv-line); margin-bottom: 20px; flex-wrap: wrap; }
.nv-tab {
    padding: 10px 15px;
    border-radius: var(--nv-radius-sm) var(--nv-radius-sm) 0 0;
    color: var(--nv-text-soft);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    background: none;
}
.nv-tab:hover { color: var(--nv-text); text-decoration: none; }
.nv-tab.is-active {
    background: var(--nv-surface);
    border-color: var(--nv-line);
    color: var(--nv-text);
    margin-bottom: -1px;
}

.nv-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.nv-toolbar form { display: flex; gap: 8px; flex-wrap: wrap; }
.nv-search-input { min-width: 220px; }

.nv-pagination { display: flex; gap: 5px; justify-content: center; padding-top: 18px; flex-wrap: wrap; }
.nv-pagination a, .nv-pagination span {
    padding: 7px 12px;
    border-radius: var(--nv-radius-sm);
    border: 1px solid var(--nv-line);
    color: var(--nv-text);
    font-size: 14px;
}
.nv-pagination a.is-active { background: var(--nv-accent); border-color: transparent; color: #fff; }
.nv-pagination a:hover { text-decoration: none; border-color: var(--nv-accent); }

/* ------------------------------------------------------------- Diagramme */
.nv-chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.nv-chart-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.nv-chart-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--nv-accent), rgba(59, 111, 255, .45));
    border-radius: 5px 5px 0 0;
    min-height: 3px;
    transition: height .3s ease;
}
.nv-chart-label { font-size: 10px; color: var(--nv-text-soft); white-space: nowrap; }

.nv-bar-list { display: grid; gap: 11px; }
.nv-bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.nv-bar-track { grid-column: 1 / -1; height: 7px; background: var(--nv-surface-2); border-radius: 4px; overflow: hidden; }
.nv-bar-fill { height: 100%; background: var(--nv-accent); border-radius: 4px; }

/* --------------------------------------------------------------- Medien */
.nv-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.nv-media-item {
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-sm);
    overflow: hidden;
    background: var(--nv-surface-2);
    display: flex;
    flex-direction: column;
}
.nv-media-thumb { height: 110px; display: grid; place-items: center; overflow: hidden; background: var(--nv-surface); }
.nv-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nv-media-info { padding: 9px 11px; font-size: 12px; }
.nv-media-name { font-weight: 600; word-break: break-all; line-height: 1.35; }
.nv-media-meta { color: var(--nv-text-soft); margin-top: 3px; }
.nv-media-actions { display: flex; gap: 6px; padding: 0 11px 11px; }

/* -------------------------------------------------------------- Plugins */
.nv-plugin-card {
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius);
    background: var(--nv-surface);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nv-plugin-head { display: flex; align-items: flex-start; gap: 12px; }
.nv-plugin-icon {
    width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
    background: var(--nv-accent-soft); color: var(--nv-accent); display: grid; place-items: center;
}
.nv-plugin-title { font-weight: 700; font-size: 15px; }
.nv-plugin-meta { font-size: 12px; color: var(--nv-text-soft); }
.nv-plugin-desc { font-size: 13px; color: var(--nv-text-soft); flex: 1; }
.nv-plugin-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.nv-dropzone {
    border: 2px dashed var(--nv-line);
    border-radius: var(--nv-radius);
    padding: 30px 20px;
    text-align: center;
    color: var(--nv-text-soft);
    background: var(--nv-surface-2);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.nv-dropzone.is-over { border-color: var(--nv-accent); background: var(--nv-accent-soft); color: var(--nv-text); }
.nv-dropzone strong { display: block; color: var(--nv-text); margin-bottom: 4px; }

/* -------------------------------------------------------------- Anmeldung */
body.nv-login-body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--nv-bg);
    color: var(--nv-text);
    font: 15px/1.6 var(--nv-font);
    padding: 24px;
}

.nv-login {
    width: 100%;
    max-width: 400px;
    background: var(--nv-surface);
    border: 1px solid var(--nv-line);
    border-radius: 18px;
    box-shadow: var(--nv-shadow);
    padding: 34px 30px;
}
.nv-login-head { text-align: center; margin-bottom: 22px; }
.nv-login-head h1 { margin: 0 0 6px; font-size: 20px; }
.nv-login-head p { margin: 0; color: var(--nv-text-soft); font-size: 14px; }
.nv-login-form { margin-top: 6px; }
.nv-login-form .nv-btn { margin-top: 12px; }
.nv-login-foot { text-align: center; margin-top: 18px; font-size: 13px; }

/* --------------------------------------------------------------- Sonstiges */
.nv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, .5);
    z-index: 45;
    display: none;
}
.nv-overlay.is-open { display: block; }

.nv-sortable-handle { cursor: grab; color: var(--nv-text-soft); }
.nv-tree-child { padding-left: 22px; }

.nv-split { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

@media (max-width: 1100px) {
    .nv-split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .nv-sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .nv-sidebar.is-open { transform: translateX(0); }
    .nv-sidebar-close { display: block; }
    .nv-main { margin-left: 0; }
    .nv-burger { display: block; }
    .nv-user-name { display: none; }
    .nv-content { padding: 20px 16px 36px; }
}

/* ---------------------------------------------------------------- Editor */
.nv-editor {
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-sm);
    background: var(--nv-surface-2);
    overflow: hidden;
}

.nv-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 7px;
    background: var(--nv-surface);
    border-bottom: 1px solid var(--nv-line);
}

.nv-editor-btn {
    min-width: 32px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--nv-text);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.nv-editor-btn:hover { background: var(--nv-accent-soft); border-color: var(--nv-line); }

.nv-editor-sep { width: 1px; background: var(--nv-line); margin: 3px 4px; }

.nv-editor-area {
    min-height: 320px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px 18px;
    background: var(--nv-surface);
    color: var(--nv-text);
    font-size: 15px;
    line-height: 1.65;
}
.nv-editor-area:focus { outline: none; }
.nv-editor-area img { max-width: 100%; height: auto; border-radius: 6px; }
.nv-editor-area blockquote {
    margin: 0 0 1em;
    padding: 8px 14px;
    border-left: 3px solid var(--nv-accent);
    color: var(--nv-text-soft);
}
.nv-editor-area pre {
    background: var(--nv-surface-2);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
}

.nv-editor .nv-editor-source {
    width: 100%;
    min-height: 320px;
    border: none;
    border-radius: 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    padding: 16px 18px;
    background: var(--nv-surface);
    color: var(--nv-text);
    resize: vertical;
}
.nv-editor .nv-editor-source:focus { outline: none; box-shadow: none; }

/* ----------------------------------------------------------------- Modal */
.nv-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 22, .6);
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
}

.nv-modal-box {
    background: var(--nv-surface);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius);
    box-shadow: var(--nv-shadow);
    width: 100%;
    max-width: 760px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.nv-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--nv-line);
}

.nv-modal-body { padding: 18px; overflow-y: auto; }
.nv-modal-body .nv-media-item { cursor: pointer; border: 1px solid var(--nv-line); text-align: left; font: inherit; color: inherit; background: var(--nv-surface-2); }
.nv-modal-body .nv-media-item:hover { border-color: var(--nv-accent); }

/* ------------------------------------------------------------ Designbereich */
.nv-image-field .nv-image-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.nv-image-preview {
    width: 130px;
    height: 84px;
    border-radius: var(--nv-radius-sm);
    border: 1px solid var(--nv-line);
    background: var(--nv-surface-2);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    color: var(--nv-text-soft);
    font-size: 12px;
}
.nv-image-preview img { width: 100%; height: 100%; object-fit: contain; }

.nv-image-controls { flex: 1; min-width: 0; display: grid; gap: 8px; }
.nv-image-controls input {
    width: 100%;
    padding: 9px 11px;
    border-radius: var(--nv-radius-sm);
    border: 1px solid var(--nv-line);
    background: var(--nv-surface-2);
    color: var(--nv-text);
    font: inherit;
    font-size: 13px;
}
.nv-image-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

/* Austauschbare Theme-Grafiken */
.nv-skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px 24px;
}
.nv-skin-field { margin-bottom: 0; }
.nv-skin-field label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nv-skin-field .nv-image-preview {
    width: 118px;
    height: 72px;
    background-image: linear-gradient(45deg, #e8edf6 25%, transparent 25%),
        linear-gradient(-45deg, #e8edf6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e8edf6 75%),
        linear-gradient(-45deg, transparent 75%, #e8edf6 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.nv-skin-field .nv-image-preview img { object-fit: cover; }
.nv-skin-state {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--nv-surface-2);
    color: var(--nv-text-soft);
    border: 1px solid var(--nv-line);
}
.nv-skin-state-own { background: #e8f1ff; color: #23508f; border-color: #c3daf8; }
.nv-skin-state-off { background: #fdeceb; color: #a7362f; border-color: #f3c8c4; }
.nv-inline-form { margin-top: 14px; }

@media (max-width: 720px) {
    .nv-skin-grid { grid-template-columns: 1fr; }
}

.nv-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--nv-line);
}
.nv-color-row:last-child { border-bottom: none; }
.nv-color-row input[type="color"] {
    width: 46px;
    height: 34px;
    padding: 3px;
    border: 1px solid var(--nv-line);
    border-radius: 7px;
    background: var(--nv-surface-2);
    cursor: pointer;
    flex-shrink: 0;
}
.nv-color-row label { display: grid; gap: 1px; font-size: 13.5px; cursor: pointer; flex: 1; min-width: 0; }
.nv-color-row code { font-size: 11px; color: var(--nv-text-soft); }

.nv-file-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--nv-radius-sm);
    color: var(--nv-text);
    font-size: 13.5px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.nv-file-item:hover { background: var(--nv-surface-2); text-decoration: none; }
.nv-file-item.is-active { background: var(--nv-accent); color: #fff; }
.nv-file-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

textarea.nv-editor-file {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    tab-size: 4;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

@media (max-width: 1250px) {
    .nv-split .nv-image-row { flex-wrap: wrap; }
    .nv-split .nv-image-preview { width: 100%; height: 110px; }
}

/* ------------------------------------------------------------ Anzeigegröße */
.nv-subhead {
    margin: 22px 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--nv-text);
}

.nv-zoom-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nv-zoom-row input[type="range"] {
    flex: 1;
    min-width: 120px;
    accent-color: var(--nv-accent);
}
.nv-zoom-row input[type="number"] {
    width: 76px;
    flex: 0 0 76px;
    text-align: right;
}
.nv-zoom-unit { color: var(--nv-text-soft); font-size: 13px; }

.nv-zoom-preview {
    margin: 16px 0 6px;
    border: 1px dashed var(--nv-line);
    border-radius: var(--nv-radius-sm);
    padding: 14px 16px 16px;
    background: var(--nv-surface-2);
}
.nv-zoom-preview-label {
    display: block;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nv-text-soft);
    margin-bottom: 8px;
}
.nv-zoom-preview-box {
    background: var(--nv-surface);
    border: 1px solid var(--nv-line);
    border-radius: var(--nv-radius-sm);
    padding: 14px 16px;
}
.nv-zoom-preview-head {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}
.nv-zoom-preview-box p { margin: 0 0 10px; font-size: 14px; color: var(--nv-text-soft); }
