:root {
    color-scheme: light;
    --bg: #f7f8fa;
    --panel: #ffffff;
    --line: #e6eaf0;
    --text: #111827;
    --muted: #64748b;
    --blue: #dceeff;
    --blue-strong: #2563eb;
    --orange: #fff1db;
    --orange-strong: #c46a17;
}

* {
    box-sizing: border-box;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    background: #f5f7fb;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 420px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.brand-lockup,
.sidebar-brand,
.user-context {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--blue-strong);
    color: #fff;
    font-weight: 700;
}

.eyebrow {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.login-panel h1 {
    margin-bottom: 0;
    font-size: 24px;
}

.login-form {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.login-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.login-form input,
.search-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
}

.login-form button,
.ghost-button,
.admin-switcher {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.login-form button {
    margin-top: 8px;
    border-color: var(--blue-strong);
    background: var(--blue-strong);
    color: #fff;
}

.form-alert,
.errorlist {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff0f0;
    color: #991b1b;
    font-size: 13px;
}

.errorlist {
    list-style: none;
}

.app-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 256px 1fr;
}

.sidebar {
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 18px 14px;
}

.sidebar-brand {
    margin-bottom: 22px;
    padding: 0 8px;
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-nav a {
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav a .nav-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: var(--blue);
    color: #0f3f87;
}

.workspace {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto minmax(180px, 420px) auto;
    align-items: center;
    gap: 18px;
    height: 56px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
}

.topbar h1 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.user-context {
    justify-self: end;
    font-size: 13px;
}

.user-context span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.ghost-button,
.admin-switcher {
    background: #fff;
    color: #334155;
}

.dashboard-main {
    padding: 32px 24px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.page-heading h2 {
    margin-bottom: 6px;
    font-size: 24px;
    font-weight: 650;
}

.page-heading p {
    color: var(--muted);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

/* Base card */
.module-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    padding: 20px;
    cursor: pointer;
    transition: opacity 0.15s;
    min-height: 140px;
    text-decoration: none;
    color: inherit;
}

.module-card:hover {
    opacity: 0.88;
}

.card-icon {
    margin-bottom: 12px;
    line-height: 0;
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-subtitle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    margin-top: auto;
    padding-top: 8px;
}

.card-subtitle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Primary (blue) */
.module-card.primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Accent (orange/amber) */
.module-card.accent {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

/* Stats card (white, two numbers) */
.module-card.stats-card {
    padding: 0;
    justify-content: stretch;
    overflow: hidden;
    cursor: default;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    gap: 2px;
}

.stat-number {
    font-size: 26px;
    font-weight: 700;
    color: #22c55e;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
}

.stat-divider {
    height: 1px;
    background: var(--line);
    flex-shrink: 0;
}

/* Links card (white, multiple clickable rows) */
.module-card.links-card {
    padding: 0;
    gap: 0;
    cursor: default;
    min-height: 100px;
}

.card-link-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: var(--blue-strong);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    min-height: 48px;
}

.card-link-row:last-child {
    border-bottom: none;
}

.card-link-row:hover {
    background: #f8fafc;
}

.card-link-row svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
    flex-shrink: 0;
}

/* Single icon white card */
.module-card.single-card {
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    min-height: 120px;
}

.single-card .card-icon {
    margin-bottom: 0;
    color: #64748b;
}

.single-card .card-icon svg {
    width: 26px;
    height: 26px;
}

.single-card .card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0;
}

/* Section divider */
.module-section-header {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--muted);
    text-transform: uppercase;
    padding: 20px 0 4px;
    background: none;
    border: none;
}

/* Navigation groups */
.nav-group {
    display: grid;
    gap: 4px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

.nav-group-header:hover {
    background: var(--blue);
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-group-toggle {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 12px;
}

.nav-group.collapsed .nav-group-toggle {
    transform: rotate(-90deg);
}

.nav-group.collapsed .nav-group-items {
    display: none;
}

.nav-group-items {
    display: grid;
    gap: 2px;
    padding-left: 12px;
}

.nav-group-items a {
    border-radius: 8px;
    color: #334155;
    font-size: 13px;
    padding: 8px 12px;
}

.nav-group-items a:hover {
    background: var(--blue);
    color: #0f3f87;
}

/* User context form */
.user-context form {
    margin: 0;
}

/* SVG global */
svg {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

@media (max-width: 760px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .topbar {
        grid-template-columns: 1fr auto;
        padding: 0 16px;
    }

    .search-form {
        display: none;
    }

    .dashboard-main {
        padding: 24px 16px;
    }

    .page-heading {
        display: grid;
    }

    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}
/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--blue-strong);
    font-weight: 500;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb > span {
    color: var(--text);
    font-weight: 600;
}

.breadcrumb svg { color: var(--muted); flex-shrink: 0; }

.breadcrumb-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    cursor: pointer;
    color: var(--muted);
}

.icon-btn:hover { background: var(--bg); }

/* ============================================================
   STATUS KAARTEN
   ============================================================ */
.status-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 18px;
    min-width: 140px;
    flex: 1;
    cursor: pointer;
    transition: border-color 0.15s;
}

.status-card.active {
    border-color: var(--blue-strong);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.status-card:hover { border-color: #94a3b8; }

.status-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.status-card-icon.blue { background: #eff6ff; color: #2563eb; }
.status-card-icon.orange { background: #fff7ed; color: #f59e0b; }
.status-card-icon.red { background: #fef2f2; color: #ef4444; }
.status-card-icon.green { background: #f0fdf4; color: #22c55e; }

.status-card-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.status-card-count {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.status-card-label {
    font-size: 12px;
    color: var(--muted);
}

.status-card-amount {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* ============================================================
   LIST LAYOUT (MAIN + SIDEBAR)
   ============================================================ */
.list-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    align-items: start;
}

/* ============================================================
   TOOLBAR
   ============================================================ */
.list-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blue-strong);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover { background: #1d4ed8; color: #fff; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.btn-outline:hover { background: var(--bg); }

.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--panel);
    color: var(--blue-strong);
    border: 1px solid var(--blue-strong);
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline-primary:hover { background: #eff6ff; }

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    flex: 1;
    min-width: 180px;
    color: var(--muted);
}

.search-box input {
    border: none;
    outline: none;
    font: inherit;
    font-size: 14px;
    width: 100%;
    background: transparent;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.filter-select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    font-size: 14px;
    background: var(--panel);
    cursor: pointer;
    min-width: 100px;
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.data-table {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
    white-space: nowrap;
}

.data-table th svg {
    display: inline;
    vertical-align: middle;
    margin-left: 2px;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 10px;
}

.empty-icon { color: #e2e8f0; margin-bottom: 8px; line-height: 0; }

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.empty-state p {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 8px;
}

/* ============================================================
   PAGINERING
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
    background: var(--panel);
}

.pagination-info { font-size: 13px; }

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls select {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 8px;
    font: inherit;
    font-size: 13px;
}

.page-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    cursor: pointer;
    color: var(--text);
}

.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-btn:not(:disabled):hover { background: var(--bg); }

/* ============================================================
   LIST SIDEBAR (Gerelateerd)
   ============================================================ */
.list-sidebar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 14px;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
}

.sidebar-link-row:last-child { border-bottom: none; }
.sidebar-link-row:hover { opacity: 0.75; }

.sidebar-link-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #eff6ff;
    border-radius: 7px;
    color: var(--blue-strong);
    flex-shrink: 0;
}

.sidebar-link-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-link-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-strong);
}

.sidebar-link-desc {
    font-size: 12px;
    color: var(--muted);
}

.sidebar-link-row > svg { color: var(--muted); flex-shrink: 0; }

/* ============================================================
   OFFERTE TEMPLATE PAGINA
   ============================================================ */
.tmpl-header { margin-bottom: 20px; }
.tmpl-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.badge-standaard { font-size: 12px; font-weight: 600; background: #eff6ff; color: var(--blue-strong); border: 1px solid #bfdbfe; border-radius: 20px; padding: 2px 10px; }
.tmpl-subtitle { font-size: 14px; color: var(--muted); margin: 0; }

/* Upload row */
.tmpl-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tmpl-upload-card { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.upload-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #eff6ff; border-radius: 8px; color: var(--blue-strong); flex-shrink: 0; }
.upload-icon.blue { background: #eff6ff; color: var(--blue-strong); }
.upload-body { display: flex; flex-direction: column; gap: 3px; }
.upload-label { font-size: 14px; font-weight: 600; color: var(--blue-strong); cursor: pointer; }
.upload-hint { font-size: 12px; color: var(--muted); margin: 0; }
.upload-preview { margin-top: 4px; }
.upload-current { font-size: 12px; }
.file-input { font-size: 13px; margin-top: 4px; }

/* Logo positie */
.logo-positie-group { margin-top: 6px; }
.logo-positie-btns { display: flex; gap: 6px; margin-top: 4px; }
.positie-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; cursor: pointer; background: var(--bg); user-select: none; }
.positie-btn input[type=radio] { display: none; }
.positie-btn--active { background: var(--blue-strong); color: #fff; border-color: var(--blue-strong); }

/* Document blok */
.tmpl-doc-block { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px; margin-bottom: 12px; }

/* Logo in document */
.tmpl-logo-row { display: flex; margin-bottom: 16px; }
.tmpl-logo-links { justify-content: flex-start; }
.tmpl-logo-midden { justify-content: center; }
.tmpl-logo-rechts { justify-content: flex-end; }
.tmpl-logo-img { max-height: 60px; max-width: 200px; object-fit: contain; }

/* Klant + meta rij */
.tmpl-klant-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tmpl-klant strong { font-size: 14px; font-weight: 700; }
.tmpl-klant p { font-size: 13px; color: #374151; margin: 6px 0 0; line-height: 1.6; }
.edit-link { cursor: pointer; color: var(--muted); margin-left: 6px; }
.meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0; font-size: 13px; }
.meta-row-right { }
.meta-key { font-weight: 500; color: #374151; }
.meta-val { color: var(--text); }
.tmpl-meta-tabel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

/* Regel tabel */
.tmpl-regels-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.tmpl-regels-table th { text-align: left; padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.tmpl-regels-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tmpl-regels-table .col-icon { width: 24px; }
.regel-vrije-tekst { color: #9ca3af; font-size: 12px; font-style: italic; }
.btw-select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 13px; }
.regel-menu-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 0 4px; }

/* Totalen */
.tmpl-totalen { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.btw-tabel { width: 100%; font-size: 12px; border-collapse: collapse; }
.btw-tabel th { color: var(--muted); font-weight: 600; padding: 4px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.btw-tabel td { padding: 4px 8px; }
.totalen-kolom { display: flex; flex-direction: column; gap: 4px; }
.totaal-rij { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.totaal-rij--groot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 15px; }

/* Editor blok */
.tmpl-editor-block { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.editor-select { border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; font-size: 13px; margin-right: 8px; }
.editor-btn { background: none; border: none; padding: 4px 7px; border-radius: 5px; cursor: pointer; font-size: 13px; color: #374151; line-height: 1; }
.editor-btn:hover { background: var(--line); }
.editor-area { width: 100%; min-height: 80px; border: none; outline: none; padding: 14px 16px; font: inherit; font-size: 14px; color: var(--muted); resize: vertical; box-sizing: border-box; }

/* Instellingen rij */
.tmpl-instellingen { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.instelling-rij { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }

.tmpl-builder-options { display: grid; grid-template-columns: 1fr; gap: 18px; }
.builder-section h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.builder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.builder-grid-labels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.builder-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.builder-field span { font-size: 12px; font-weight: 600; color: var(--muted); }
.builder-field textarea.filter-select { min-height: 76px; resize: vertical; line-height: 1.45; }
.builder-field-wide { grid-column: span 2; }
.builder-field-color input[type="color"] { width: 52px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.builder-toggle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.builder-toggle-grid label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; }
.builder-toggle-grid input { width: 16px; height: 16px; accent-color: var(--blue-strong); }

@media (max-width: 1100px) {
    .builder-grid,
    .builder-grid-labels,
    .builder-toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .builder-grid,
    .builder-grid-labels,
    .builder-toggle-grid { grid-template-columns: 1fr; }
    .builder-field-wide { grid-column: auto; }
}

/* Footer knoppen */
.tmpl-footer-btns { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.btn-preview { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--blue-strong); text-decoration: none; font-weight: 500; }
.btn-preview:hover { text-decoration: underline; }
.footer-action-btns { display: flex; gap: 10px; }

/* Flash messages */
.flash-messages { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 8px; }
.flash-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
