/* Maten geschaald naar 90% (zelfde formaat als Lumos Radio op 90% zoom) */
/* =====================================================================
   Lumos Signage - dashboard
   Indeling: menu | inhoud | live paneel, met onderin de live-balk van een scherm.
   in de huisstijl van LumosVision: Inter, zwart/wit, rustige grijstinten.
   ===================================================================== */

:root {
    --app-bg: #ffffff;
    --panel-bg: #ffffff;
    --surface: #f5f5f7;
    --surface-2: #ebebef;
    --surface-3: #e1e1e6;
    --border: #e8e8ed;
    --border-strong: #d2d2d7;
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #a1a1a6;
    --accent: #000000;
    --accent-hover: #333333;
    --accent-contrast: #ffffff;
    --live: #34c759;
    --live-soft: rgba(52, 199, 89, 0.14);
    --warning: #c27c0e;
    --warning-soft: rgba(255, 159, 10, 0.14);
    --danger: #e5484d;
    --danger-soft: rgba(229, 72, 77, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.18);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --sidebar-w: 248px;
    --right-w: 320px;
    --topbar-h: 84px;
    --player-h: 88px;
    color-scheme: light;
}

[data-theme="dark"] {
    --app-bg: #0e0e0f;
    --panel-bg: #131314;
    --surface: #1c1c1e;
    --surface-2: #2a2a2d;
    --surface-3: #36363a;
    --border: #232325;
    --border-strong: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;
    --accent: #ffffff;
    --accent-hover: #d9d9de;
    --accent-contrast: #000000;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    background: var(--app-bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.icon-sm {
    width: 15px;
    height: 15px;
}

.icon-lg {
    width: 22px;
    height: 22px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.muted {
    color: var(--text-2);
}

.faint {
    color: var(--text-3);
}

::selection {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* Scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 8px;
}

/* =====================================================================
   App-indeling
   ===================================================================== */
body.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--right-w);
    grid-template-rows: minmax(0, 1fr) var(--player-h);
    grid-template-areas:
        "sidebar main right"
        "player player player";
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border-right: 1px solid var(--border);
    min-height: 0;
    overflow-y: auto;
    z-index: 40;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--topbar-h);
    padding: 0 24px;
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 112px;
    height: auto;
}

.logo-dark {
    display: none !important;
}

[data-theme="dark"] .logo-light {
    display: none !important;
}

[data-theme="dark"] .logo-dark {
    display: block !important;
}

.sidebar-section {
    padding: 8px 16px 18px;
}

.sidebar-section + .sidebar-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.sidebar-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 0 10px 10px;
}

.sidebar-label a {
    color: var(--text-3);
    display: flex;
}

.sidebar-label a:hover {
    color: var(--text);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav a:hover {
    color: var(--text);
    background: var(--surface);
}

.nav a.active {
    color: var(--text);
    background: var(--surface);
    font-weight: 600;
}

.nav a.active .icon {
    color: var(--text);
}

.nav .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
}

/* Locaties in de sidebar (zoals "Listening with friends" in de video) */
.side-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border-radius: var(--radius);
}

.side-item:hover {
    background: var(--surface);
}

.side-item .name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-item .square-btn {
    opacity: 0.85;
}

.side-empty {
    font-size: 12.44px;
    color: var(--text-3);
    padding: 0 10px;
}

.sidebar-user {
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user .who {
    flex: 1;
    min-width: 0;
}

.sidebar-user .who strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .who span {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Avatar ---------- */
.avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar.sm {
    width: 30px;
    height: 30px;
    font-size: 11px;
}

.avatar .status {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--text-3);
    border: 2px solid var(--panel-bg);
}

.avatar .status.live {
    background: var(--live);
}

/* ---------- Hoofdkolom ---------- */
.main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--app-bg);
}

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 32px;
    flex-shrink: 0;
}

.icon-only-mobile {
    display: none !important;
}

.search {
    position: relative;
    width: 320px;
    flex-shrink: 0;
}

.search input {
    width: 100%;
    height: 44px;
    border: 1px solid transparent;
    background: var(--surface);
    border-radius: 999px;
    padding: 0 48px 0 20px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.search input::placeholder {
    color: var(--text-3);
}

.search input:focus {
    border-color: var(--border-strong);
    background: var(--panel-bg);
}

.search button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search button:hover {
    color: var(--text);
}

.tabs {
    display: flex;
    align-items: center;
    gap: 26px;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.tabs a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
    transition: color 0.15s;
}

.tabs a:hover,
.tabs a.active {
    color: var(--text);
}

.tabs a.active {
    font-weight: 600;
}

.tabs .more {
    display: flex;
    color: var(--text-2);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.content-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 32px 40px;
    scroll-behavior: smooth;
}

#content {
    max-width: 1280px;
    margin: 0 auto;
    animation: fadeIn 0.25s ease;
}

#content.loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Rechterpaneel ---------- */
.rightpanel {
    grid-area: right;
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border-left: 1px solid var(--border);
    min-height: 0;
    overflow: hidden;
    z-index: 30;
}

.rp-head {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 0 24px;
    flex-shrink: 0;
}

.rp-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.rp-section {
    padding: 8px 24px 22px;
}

.rp-section + .rp-section {
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.rp-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rp-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.rp-title a,
.rp-title span {
    font-size: 13px;
    color: var(--text-2);
}

.rp-title a:hover {
    color: var(--text);
}

.rp-sub {
    font-size: 12px;
    color: var(--text-3);
    margin: -7.2px 0 12px;
}

.loc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.loc-row .info {
    flex: 1;
    min-width: 0;
}

.loc-row .info strong {
    display: block;
    font-size: 13.56px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-row .info span {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.q-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    margin: 0 -9px;
    border-radius: var(--radius);
}

.q-item.current {
    background: var(--surface);
}

.q-art {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--surface-2);
    overflow: hidden;
    flex-shrink: 0;
}

.q-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.q-item.current .q-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='white'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.q-info {
    flex: 1;
    min-width: 0;
}

.q-info strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-info span {
    display: block;
    font-size: 11.44px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-time {
    font-size: 12px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.rp-empty {
    font-size: 13px;
    color: var(--text-3);
    padding: 6px 0 4px;
    line-height: 1.5;
}

/* ---------- Speler ---------- */
.player {
    grid-area: player;
    display: grid;
    grid-template-columns: var(--sidebar-w) auto minmax(0, 1fr) var(--right-w);
    align-items: center;
    gap: 0;
    background: var(--panel-bg);
    border-top: 1px solid var(--border);
    z-index: 50;
}

.pl-now {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px 0 24px;
    min-width: 0;
}

.pl-art {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--surface-2);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
}

.pl-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pl-meta {
    min-width: 0;
}

.pl-meta strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-meta span {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.56px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--live);
    margin-top: 2px;
}

.pl-live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.pl-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
}

.pl-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s, opacity 0.15s;
}

.pl-btn:hover {
    color: var(--text);
}

.pl-btn.on {
    color: var(--text);
}

.pl-btn.on::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(14px);
}

.pl-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.pl-play {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: var(--accent-contrast);
}

.pl-play:hover {
    background: var(--accent-hover);
    color: var(--accent-contrast);
}

.pl-play .icon {
    width: 18px;
    height: 18px;
}

.pl-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 28px;
    min-width: 0;
}

.pl-time {
    font-size: 12px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: center;
}

.bar {
    position: relative;
    flex: 1;
    height: 5px;
    border-radius: 5px;
    background: var(--surface-2);
    cursor: pointer;
}

.bar .fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 5px;
    background: var(--accent);
}

.bar.disabled {
    cursor: default;
}

.pl-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 28px 0 12px;
}

.pl-listeners {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-2);
    margin-right: 6px;
}

.vol {
    width: 96px;
    flex: none;
}

/* =====================================================================
   Componenten
   ===================================================================== */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 4px 0 24px;
    flex-wrap: wrap;
}

.page-head h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--text-2);
    max-width: 640px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section {
    margin-top: 34px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-head a {
    font-size: 13px;
    color: var(--text-2);
}

.section-head a:hover {
    color: var(--text);
}

.section-head a.btn {
    color: var(--text);
}

.section-head a.btn-primary,
.section-head a.btn-primary:hover {
    color: var(--accent-contrast);
}

/* Knoppen */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--panel-bg);
    color: var(--text);
    font-weight: 500;
    font-size: 13.56px;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, transform 0.15s, color 0.15s;
}

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

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-2);
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--text);
}

.btn-danger {
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12.44px;
    border-radius: 7px;
}

.btn-lg {
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
}

.btn[disabled],
.btn.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.icon-btn.sm {
    width: 30px;
    height: 30px;
}

.icon-btn.danger-hover:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.square-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: none;
    background: var(--surface);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.square-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

.pill-btn {
    height: 30px;
    padding: 0 14px;
    border-radius: 7px;
    border: none;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.pill-btn:hover {
    background: var(--accent-hover);
}

.pill-btn.light {
    background: var(--surface);
    color: var(--text);
}

.pill-btn.light:hover {
    background: var(--surface-2);
}

.play-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--accent-contrast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.15s, background 0.15s;
}

.play-fab:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.play-fab .icon {
    width: 20px;
    height: 20px;
}

/* Thema-schakelaar (zoals in de video) */
.theme-switch {
    position: relative;
    width: 52px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: var(--surface-2);
    padding: 0;
    flex-shrink: 0;
}

.theme-switch .knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--panel-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: transform 0.25s ease;
}

.theme-switch .knob .icon {
    width: 13px;
    height: 13px;
}

[data-theme="dark"] .theme-switch .knob {
    transform: translateX(24px);
    background: #f5f5f7;
    color: #111;
}

.theme-switch .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-switch .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-switch .icon-moon {
    display: block;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    white-space: nowrap;
}

.live-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
}

.live-pill.on {
    color: var(--text);
}

.live-pill.on .dot {
    background: var(--live);
    box-shadow: 0 0 0 3px var(--live-soft);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    z-index: 200;
    display: none;
}

.dropdown.open .dropdown-menu {
    display: block;
    animation: fadeIn 0.15s ease;
}

.dropdown-menu .dm-head {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.dropdown-menu .dm-head strong {
    display: block;
    font-size: 13px;
}

.dropdown-menu .dm-head span {
    font-size: 12px;
    color: var(--text-3);
}

.dropdown-menu a,
.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    text-align: left;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: var(--surface);
}

.dropdown-menu .danger {
    color: var(--danger);
}

/* Formulieren */
.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.field label,
.label {
    font-size: 13px;
    font-weight: 500;
}

.field .hint {
    font-size: 12px;
    color: var(--text-3);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--panel-bg);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
    height: auto;
    min-height: 90px;
    padding: 12px 14px;
    resize: vertical;
}

.select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .input:focus,
[data-theme="dark"] .select:focus,
[data-theme="dark"] .textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border-radius: 9px;
    background: var(--surface);
    gap: 2px;
}

.segmented label {
    position: relative;
}

.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
}

.segmented input:checked + span {
    background: var(--panel-bg);
    color: var(--text);
    box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

.swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.swatches label {
    position: relative;
}

.swatches input {
    position: absolute;
    opacity: 0;
}

.swatches span {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.swatches input:checked + span {
    box-shadow: 0 0 0 2px var(--panel-bg), 0 0 0 4px var(--text);
}

.checkbox {
    width: 17px;
    height: 17px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Kaarten */
.card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.card + .card {
    margin-top: 18px;
}

.card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.card .card-sub {
    margin: 0 0 18px;
    color: var(--text-2);
    font-size: 13px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.grid-2 .card + .card {
    margin-top: 0;
}

/* Hero-banner (zoals "Justin Bieber - Top 50 Songs") */
.hero-wrap {
    position: relative;
    margin-top: 4px;
}

.hero-slides {
    position: relative;
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1d1d1f;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 48px;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.05) 100%);
}

.hero-slide .hero-mosaic {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 52%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    opacity: 0.9;
}

.hero-slide .hero-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide .hero-text {
    position: relative;
    max-width: 520px;
    z-index: 1;
}

.hero-slide .eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.75;
}

.hero-slide h2 {
    margin: 8px 0 6px;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hero-slide p {
    margin: 0 0 20px;
    font-size: 17px;
    opacity: 0.85;
}

.hero-slide .btn {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.hero-slide .btn:hover {
    background: #f0f0f0;
}

.hero-slide .btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.hero-slide .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-nav:hover {
    color: var(--text);
}

.hero-nav.prev {
    left: -28.8px;
}

.hero-nav.next {
    right: -28.8px;
}

.hero-dots {
    position: absolute;
    bottom: 16px;
    left: 48px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.hero-dots button {
    width: 7px;
    height: 7px;
    border-radius: 7px;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s, background 0.25s;
}

.hero-dots button.active {
    width: 22px;
    background: #fff;
}

/* Kaarten-raster (zoals "Chill Hits", "Pop Mix") */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 22px;
}

.card-grid.row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.media-card {
    display: block;
    min-width: 0;
    position: relative;
}

.media-card .cover {
    margin-bottom: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-card:hover .cover {
    transform: translateY(-2.7px);
    box-shadow: var(--shadow);
}

.media-card h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card p {
    margin: 0;
    font-size: 12.44px;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-card .card-play {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 2;
}

.media-card:hover .card-play {
    opacity: 1;
    transform: none;
}

.media-card .card-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
}

/* Covers */
.cover {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cover, #1d1d1f);
    color: #fff;
    display: flex;
    align-items: flex-end;
}

.cover img.cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover .mosaic {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.cover .mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover .mosaic.one {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.cover-label {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    word-break: break-word;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
        radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, 0.35), transparent 60%);
}

.cover-rings {
    position: absolute;
    right: -22%;
    top: -22%;
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 14px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.04);
}

/* Tegels met statistieken */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
}

.stat .label {
    font-size: 12.44px;
    color: var(--text-2);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
}

.stat .value {
    margin-top: 8px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat .value small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    margin-left: 4px;
}

/* Detailkop (playlist / genre) */
.detail-head {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    margin: 4px 0 26px;
}

.detail-head .cover {
    width: 210px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.detail-head .cover-label {
    font-size: 28px;
    padding: 18px;
}

.detail-info {
    min-width: 0;
    flex: 1;
}

.detail-info .eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-2);
}

.detail-info h1 {
    margin: 8px 0 8px;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    word-break: break-word;
}

.detail-info p.desc {
    margin: 0 0 10px;
    color: var(--text-2);
    max-width: 640px;
}

.meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-2);
}

.meta-line .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-3);
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* Stream-URL vak */
.url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-radius: 10px;
    padding: 6px 6px 6px 14px;
    min-width: 0;
}

.url-box code {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.url-box .icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--panel-bg);
}

.formats {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.formats a {
    font-size: 11.44px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-2);
}

.formats a:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* Tabellen / tracklijsten */
.table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--panel-bg);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    font-size: 11.44px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-bg);
    white-space: nowrap;
}

.table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background 0.12s;
}

.table tbody tr:hover {
    background: var(--surface);
}

.table .num {
    width: 44px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.table .actions {
    text-align: right;
    white-space: nowrap;
}

.table .time {
    font-variant-numeric: tabular-nums;
    color: var(--text-2);
    white-space: nowrap;
}

.table.selectable tbody tr.selected {
    background: var(--surface);
}

.track-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.track-cell .q-art {
    width: 42px;
    height: 42px;
}

.track-cell .t {
    min-width: 0;
}

.track-cell .t strong {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

.track-cell .t span {
    display: block;
    font-size: 12.44px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

.track-row .row-play {
    display: none;
}

.track-row:hover .num-label {
    display: none;
}

.track-row:hover .row-play {
    display: inline-flex;
}

.track-row.is-unavailable td {
    opacity: 0.5;
}

.track-row.dragging {
    opacity: 0.4;
}

.track-row.drag-over td {
    box-shadow: inset 0 2px 0 var(--accent);
}

.drag-handle {
    cursor: grab;
    color: var(--text-3);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Badges & chips */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11.44px;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-2);
    white-space: nowrap;
}

.badge.live {
    background: var(--live-soft);
    color: #1f8f3d;
}

[data-theme="dark"] .badge.live {
    color: var(--live);
}

.badge.live::before,
.badge.offline::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge.offline {
    color: var(--text-3);
}

.badge.warn {
    background: var(--warning-soft);
    color: var(--warning);
}

.badge.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge.dark {
    background: var(--accent);
    color: var(--accent-contrast);
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.chip:hover {
    color: var(--text);
    background: var(--surface-2);
}

.chip.active {
    background: var(--accent);
    color: var(--accent-contrast);
}

.chip small {
    opacity: 0.7;
    font-weight: 500;
}

/* Lege staten & meldingen */
.empty {
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-2);
}

.empty .empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--text);
}

.empty .empty-icon .icon {
    width: 26px;
    height: 26px;
}

.empty h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 17px;
}

.empty p {
    margin: 0 auto 18px;
    max-width: 420px;
}

.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface);
    font-size: 13.56px;
    margin-bottom: 20px;
}

.notice .icon {
    margin-top: 1px;
}

.notice.warn {
    background: var(--warning-soft);
}

.notice.warn .icon {
    color: var(--warning);
}

.notice.danger {
    background: var(--danger-soft);
}

.notice.danger .icon {
    color: var(--danger);
}

.notice strong {
    display: block;
    margin-bottom: 2px;
}

.notice p {
    margin: 0;
    color: var(--text-2);
}

/* Voortgang */
.progress {
    height: 6px;
    border-radius: 6px;
    background: var(--surface-2);
    overflow: hidden;
}

.progress .fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.4s ease;
}

.prep-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.44px;
    color: var(--text-2);
}

.prep-status .progress {
    width: 140px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 500;
}

.modal-backdrop.open {
    display: flex;
    animation: fadeIn 0.15s ease;
}

.modal {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--panel-bg);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal.wide {
    max-width: 760px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 4px;
}

.modal-head h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 16px 24px 8px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 24px 22px;
}

/* Toasts */
.toasts {
    position: fixed;
    right: 24px;
    bottom: calc(var(--player-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    max-width: 380px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #1d1d1f;
    color: #fff;
    font-size: 13.56px;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastIn 0.25s ease;
}

[data-theme="dark"] .toast {
    background: #f5f5f7;
    color: #111;
}

.toast.error .icon {
    color: #ff6b6b;
}

.toast.success .icon {
    color: var(--live);
}

.toast.hide {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* Popover "toevoegen aan playlist" */
.popover {
    position: fixed;
    min-width: 240px;
    max-width: 300px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 600;
    animation: fadeIn 0.12s ease;
}

.popover .pop-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 8px 10px 6px;
}

.popover button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    text-align: left;
    font-size: 13px;
}

.popover button:hover {
    background: var(--surface);
}

.popover .swatch {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    flex-shrink: 0;
}

.popover .pop-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

/* Upload dropzone */
.dropzone {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    color: var(--text-2);
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.dropzone.over {
    border-color: var(--accent);
    background: var(--surface);
}

.dropzone strong {
    color: var(--text);
}

.upload-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.upload-item {
    display: grid;
    grid-template-columns: 1fr 120px 70px;
    gap: 12px;
    align-items: center;
    font-size: 12.44px;
}

.upload-item .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item .state {
    text-align: right;
    color: var(--text-2);
}

/* Zoek/toevoegen-paneel in playlist */
.add-panel {
    margin-top: 18px;
}

.add-panel .add-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.add-panel .add-tools .input {
    flex: 1;
    min-width: 200px;
}

.add-panel .add-tools .select {
    width: 220px;
}

.results {
    max-height: 440px;
    overflow-y: auto;
}

.result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius);
}

.result-row:hover {
    background: var(--surface);
}

.result-row .track-cell {
    flex: 1;
}

.result-row.added {
    opacity: 0.55;
}

/* Lijst met zenders / streams */
.stream-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stream-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
}

.stream-item .cover {
    width: 56px;
    border-radius: 10px;
}

.stream-item .cover-label {
    font-size: 13px;
    padding: 7px;
}

.stream-item .s-title strong {
    display: block;
    font-size: 14.56px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-item .s-title span {
    display: block;
    font-size: 12.44px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-item .s-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Locaties */
.bulk-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    margin-bottom: 14px;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: 12px;
    flex-wrap: wrap;
}

.bulk-bar.show {
    display: flex;
}

.bulk-bar .select {
    width: 260px;
    height: 36px;
    background-color: var(--panel-bg);
    color: var(--text);
}

.bulk-bar .btn {
    height: 36px;
}

.bulk-bar .count {
    font-weight: 600;
    margin-right: auto;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    max-width: 240px;
}

.source-pill .swatch {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.source-pill .swatch .icon {
    width: 12px;
    height: 12px;
}

.source-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-name strong {
    display: block;
    font-weight: 600;
}

.loc-name span {
    display: block;
    font-size: 12.44px;
    color: var(--text-2);
}

.sync-groups {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.sync-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--surface);
    font-size: 12.44px;
}

.sync-group strong {
    font-weight: 600;
}

/* Instellingen */
.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.kv {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px 16px;
    font-size: 13.56px;
}

.kv dt {
    color: var(--text-2);
}

.kv dd {
    margin: 0;
    word-break: break-word;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-3);
    margin-right: 6px;
}

.status-dot.ok {
    background: var(--live);
}

.status-dot.bad {
    background: var(--danger);
}

.code-block {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.44px;
    background: var(--surface);
    border-radius: 10px;
    padding: 12px 14px;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

/* Overlay voor mobiel menu */
.scrim {
    display: none;
}

/* =====================================================================
   Responsief
   ===================================================================== */
@media (max-width: 1380px) {
    :root {
        --right-w: 0px;
    }

    .rightpanel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: var(--player-h);
        width: 320px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
    }

    body.rp-open .rightpanel {
        transform: none;
    }

    .player {
        grid-template-columns: var(--sidebar-w) auto minmax(0, 1fr) 260px;
    }

    .card-grid.row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .card-grid.row > :nth-child(n+5) {
        display: none;
    }
}

@media (min-width: 1381px) {
    .only-narrow {
        display: none !important;
    }
}

@media (max-width: 1100px) {
    .tabs {
        display: none;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-2,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .stream-item {
        grid-template-columns: 56px minmax(0, 1fr) auto;
    }

    .stream-item .s-url {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-w: 0px;
        --topbar-h: 68px;
        --player-h: 76px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
        z-index: 400;
    }

    body.nav-open .sidebar {
        transform: none;
    }

    body.nav-open .scrim,
    body.rp-open .scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 25;
    }

    body.nav-open .scrim {
        z-index: 350;
    }

    .icon-only-mobile {
        display: inline-flex !important;
    }

    .topbar {
        gap: 12px;
        padding: 0 16px;
    }

    .search {
        width: auto;
        flex: 1;
    }

    .content-scroll {
        padding: 0 16px 32px;
    }

    .player {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pl-progress,
    .pl-right,
    .pl-btn.optional {
        display: none;
    }

    .pl-now {
        padding-left: 16px;
    }

    .pl-controls {
        padding: 0 16px;
        gap: 6px;
    }

    .toasts {
        left: 16px;
        right: 16px;
    }

    .card-grid.row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid.row > :nth-child(n+3) {
        display: none;
    }

    .hero-slides {
        height: 210px;
    }

    .hero-slide {
        padding: 0 24px;
    }

    .hero-slide h2 {
        font-size: 30px;
    }

    .hero-slide .hero-mosaic {
        display: none;
    }

    .hero-nav {
        display: none;
    }

    .hero-dots {
        left: 24px;
    }

    .detail-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-head .cover {
        width: 160px;
    }

    .detail-info h1 {
        font-size: 32px;
    }

    .table .hide-sm {
        display: none;
    }

    .table-wrap {
        overflow-x: auto;
    }

    .table td,
    .table th {
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .kv {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    .kv dd {
        margin-bottom: 10px;
    }
}

@media (max-width: 560px) {
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .stream-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .stream-item .s-actions {
        grid-column: 1 / -1;
    }

    .top-actions .live-pill,
    .top-actions .theme-switch {
        display: none;
    }

    .top-actions {
        gap: 4px;
    }
}

/* Toegang & zenders / installatie */
.toggle-list { display: flex; flex-direction: column; }
.toggle-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-top: 1px solid var(--border);
    cursor: pointer; font-weight: 400;
}
.toggle-list .toggle-row:first-child { border-top: 0; }
.toggle-ico {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    background: var(--surface); display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.toggle-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toggle-text small { color: var(--text-2); font-size: 12.44px; line-height: 1.4; }
.switch {
    appearance: none; -webkit-appearance: none; flex: none;
    width: 40px; height: 24px; border-radius: 999px; margin: 0;
    background: var(--border-strong); position: relative; cursor: pointer;
    transition: background 0.2s ease;
}
.switch::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease;
}
.switch:checked { background: var(--live); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.media-card.is-offline .cover { opacity: 0.55; }
.media-card .status-dot { margin-right: 6px; }
.install-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.install-step {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 13.56px;
}
.install-step .st { flex: none; width: 20px; text-align: center; font-weight: 700; }
.install-step.ok .st { color: var(--live); }
.install-step.warn .st { color: var(--warning); }
.install-step.fail .st { color: var(--danger); }
.install-step .msg { flex: 1; min-width: 0; }
.install-step .msg small { display: block; color: var(--text-2); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.pl-sub-hint { opacity: 0.7; }

/* =====================================================================
   Lumos Signage - aanvullingen
   ===================================================================== */
:root {
    --brand: #d4213d;
}

[data-theme="dark"] {
    --brand: #ff5468;
}

/* ---------- Logo ---------- */
.brand {
    flex-direction: column;
    gap: 5px;
}

.sidebar-logo img {
    width: 118px;
}

.brand-sub {
    display: block;
    font-size: 12.44px;
    font-weight: 500;
    letter-spacing: 0.2em;
    line-height: 1;
    color: var(--text);
    text-align: center;
    padding-left: 0.2em;
}

.brand-sub b {
    font-weight: 500;
    color: var(--brand);
}

.brand-center {
    display: flex;
    align-items: center;
    margin: 0 auto 28px;
}

.brand-center img {
    width: 150px;
}

.brand-center .brand-sub {
    font-size: 14px;
}

/* ---------- Inloggen / installatie ---------- */
body.auth-page {
    min-height: 100vh;
    background: var(--surface);
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 40px 34px 34px;
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.auth-card > p.muted {
    margin: 0 0 22px;
}

.auth-form {
    margin-top: 6px;
}

.auth-foot {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-3);
}

.btn-block {
    display: flex;
    width: 100%;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 20px;
    font-size: 13.56px;
    cursor: pointer;
}

/* ---------- Kleine onderdelen ---------- */
.select-sm {
    height: 34px;
    width: 180px;
    font-size: 12.44px;
    padding-left: 12px;
    border-radius: 999px;
}

.thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
}

.q-art.wide {
    width: 64px;
    height: 40px;
}

.track-cell .q-art.wide {
    width: 68px;
    height: 42px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.inline-form {
    display: inline;
}

.text-link {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hint-text {
    font-size: 12.44px;
    color: var(--text-2);
    line-height: 1.5;
}

.steps-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.7;
}

/* Live-balk: pauzeer/hervat-knop */
.js-cmd-toggle .icon-play {
    display: none;
}

.js-cmd-toggle.is-paused .icon-play {
    display: block;
}

.js-cmd-toggle.is-paused .icon-pause {
    display: none;
}

a.pl-btn[aria-disabled="true"] {
    opacity: 0.3;
    pointer-events: none;
}

.pl-right .icon {
    color: var(--text-2);
}

/* ---------- Kaart (Leaflet) ---------- */
.map-box {
    position: relative;
    z-index: 0;
    height: 380px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
}

.map-box.tall {
    height: 460px;
}

.map-box .leaflet-container {
    font-family: inherit;
    background: var(--surface);
}

.map-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8e8e93;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-dot.live {
    background: var(--live);
    box-shadow: 0 0 0 6px var(--live-soft), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-size: 13px;
    line-height: 1.45;
}

.map-pop strong {
    display: block;
    font-size: 14px;
}

.map-pop span {
    display: block;
    color: #6e6e73;
}

.map-pop a {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: #1d1d1f !important;
}

[data-theme="dark"] .leaflet-bar a {
    background: var(--panel-bg);
    color: var(--text);
    border-color: var(--border);
}

/* ---------- Schermen & media ---------- */
.cover.wide {
    aspect-ratio: 16 / 9;
}

.cover .cover-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
}

.cover .cover-icon .icon {
    width: 30px;
    height: 30px;
}

.cover video.cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.media-card .meta-line {
    font-size: 12.44px;
}

.card-tools {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 6px;
    z-index: 3;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
}

.media-card:hover .card-tools,
.media-card:focus-within .card-tools {
    opacity: 1;
    transform: none;
}

.card-tools .icon-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.94);
    color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-tools .icon-btn:hover {
    background: #fff;
    color: #000;
}

.card-tools .icon-btn.danger-hover:hover {
    color: var(--danger);
}

/* Groot voorbeeld van een scherm */
.screen-preview {
    position: relative;
    width: 380px;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0b0b0c;
    box-shadow: var(--shadow);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-preview.portrait {
    width: 200px;
    aspect-ratio: 9 / 16;
}

.screen-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screen-preview .icon {
    width: 34px;
    height: 34px;
}

.screen-preview .sp-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
}

.screen-preview .sp-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 2;
}

.screen-preview .sp-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
}

/* Afspeellijst bewerken */
.dur-input {
    width: 84px;
    height: 34px;
    text-align: center;
    padding: 0 8px;
}

.dur-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 12.44px;
}

.library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding: 2px;
}

.lib-item {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-bg);
    padding: 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.lib-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.lib-item .cover {
    border-radius: 8px;
}

.lib-item strong {
    font-size: 12.44px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lib-item .pill-btn {
    position: absolute;
    right: 14px;
    top: 14px;
}

.lib-item.added .pill-btn {
    background: var(--live);
}

/* ---------- Tijdschema ---------- */
.timeline {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
    overflow: hidden;
}

.tl-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    border-top: 1px solid var(--border);
}

.tl-row.tl-head {
    border-top: 0;
    min-height: 36px;
}

.tl-name {
    padding: 12px 18px;
    min-width: 0;
}

.tl-name strong {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-name span {
    display: block;
    font-size: 12px;
    color: var(--text-3);
}

.tl-hours {
    position: relative;
    height: 36px;
    margin-right: 18px;
}

.tl-hours span {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.tl-track {
    position: relative;
    height: 38px;
    margin: 10px 18px 10px 0;
    border-radius: 9px;
    background-color: var(--surface);
    background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 8 - 1px), var(--border) calc(100% / 8 - 1px), var(--border) calc(100% / 8));
}

.tl-block {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 7px;
    background: var(--c, #1d1d1f);
    color: #fff;
    font-size: 11.44px;
    font-weight: 600;
    padding: 0 10px;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.tl-block.default {
    top: 0;
    bottom: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-2);
    box-shadow: none;
    font-weight: 500;
}

.tl-now {
    position: absolute;
    top: -5.4px;
    bottom: -5.4px;
    width: 2px;
    border-radius: 2px;
    background: var(--brand);
    z-index: 2;
}

.day-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.day-picker label {
    position: relative;
}

.day-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.day-picker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.day-picker input:checked + span {
    background: var(--accent);
    color: var(--accent-contrast);
}

.day-picker input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.day-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.day-chips span {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-3);
}

.day-chips span.on {
    background: var(--accent);
    color: var(--accent-contrast);
}

.swatch-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: -1px;
}

/* ---------- Responsief (signage) ---------- */
@media (max-width: 900px) {
    .screen-preview {
        width: 100%;
    }

    .screen-preview.portrait {
        width: 180px;
    }

    .tl-row {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .tl-name {
        padding: 10px 12px;
    }

    .map-box,
    .map-box.tall {
        height: 300px;
    }

    .select-sm {
        width: 140px;
    }
}

@media (max-width: 560px) {
    .media-grid,
    .screen-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-tools {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Kleine aanvullingen ---------- */
.hero-slide .btn + .btn {
    margin-left: 8px;
}

.chip-sep {
    width: 1px;
    height: 22px;
    align-self: center;
    background: var(--border-strong);
    margin: 0 4px;
}

.chip .icon {
    width: 14px;
    height: 14px;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn .select,
.input-with-btn .input {
    flex: 1;
    min-width: 0;
}

.icon.flip {
    transform: rotate(180deg);
}

.notice code,
.hint-text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

.meta-line .icon {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

a.q-item:hover {
    background: var(--surface);
}

.badge .icon {
    width: 12px;
    height: 12px;
}

/* =====================================================================
   Versie 2: geen speler-balk, editors (afspeellijst en layout), koppelcode, apps
   ===================================================================== */

/* ---------- Geen balk onderin ---------- */
:root {
    --player-h: 0px;
}

body.app {
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "sidebar main right";
}

.player {
    display: none !important;
}

.toasts {
    bottom: 24px;
}

/* ---------- Brede pagina's (editors): geen rechterpaneel ---------- */
body.wide {
    --right-w: 0px;
}

body.wide .rightpanel,
body.wide .js-rp-toggle {
    display: none !important;
}

body.wide .top-actions.only-narrow {
    display: flex !important;
}

body.wide #content {
    max-width: none;
}

body.wide .content-scroll {
    padding-bottom: 24px;
}

/* ---------- Editor-raster: lijst | werkvlak | bibliotheek ---------- */
.editor-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 320px;
    gap: 20px;
    height: calc(100vh - var(--topbar-h) - 24px);
    height: calc(100dvh - var(--topbar-h) - 24px);
    min-height: 540px;
}

.pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.pane-main {
    overflow-y: auto;
}

.pane.scroll {
    overflow-y: auto;
}

.pane.scroll .lib-list {
    flex: none;
    overflow: visible;
}

.pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.pane-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.pane-create {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pane-create .input {
    height: 38px;
    font-size: 13px;
}

.square-btn.dark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-contrast);
}

.square-btn.dark:hover {
    background: var(--accent-hover);
    color: var(--accent-contrast);
}

.pane-head .square-btn.dark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.pane-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -5.4px;
    padding: 0 6px;
}

.pane-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius);
    transition: background 0.15s;
}

.pane-item:hover {
    background: var(--surface);
}

.pane-item.active {
    background: var(--surface);
}

.pane-item.active strong {
    font-weight: 600;
}

.pane-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.pane-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pane-thumb.layout {
    width: 56px;
    background: var(--surface);
    container-type: size;
}

.pane-text {
    min-width: 0;
    flex: 1;
}

.pane-text strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pane-text small {
    display: block;
    font-size: 11.44px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pane-foot {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.input-sm {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: var(--panel-bg);
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
}

.title-input {
    width: 100%;
    margin-left: -7.2px;
    padding: 2px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.title-input:hover {
    border-color: var(--border);
}

.title-input:focus {
    border-color: var(--accent);
    background: var(--panel-bg);
}

/* ---------- Layout-voorbeelden (klein) ---------- */
.layout-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.pl-thumb .layout-thumb,
.lib-thumb .layout-thumb,
.pane-thumb .layout-thumb,
.layout-card-stage .layout-thumb {
    width: min(100cqw, calc(100cqh * var(--r, 1.7778)));
}

.layout-thumb > img {
    position: absolute;
    display: block;
}

.layout-thumb > span {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
}

.layout-thumb .icon {
    width: 40%;
    height: 40%;
    max-width: 22px;
    max-height: 22px;
}

/* ---------- Afspeellijst-editor ---------- */
.pl-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.cover.pl-cover {
    width: 84px;
    flex-shrink: 0;
    border-radius: 12px;
}

.pl-cover .cover-label {
    font-size: 13px;
    padding: 8px;
}

.pl-head-info {
    flex: 1;
    min-width: 0;
}

.pl-head-info .eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
}

.pl-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.swatches.small {
    gap: 5px;
}

.swatches.small span {
    width: 18px;
    height: 18px;
}

.pl-drop {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    padding: 4px;
    border-radius: 14px;
    transition: background 0.15s;
}

.pl-drop.over {
    background: var(--surface);
}

.pl-drop-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    border: 1.5px dashed var(--border-strong);
    border-radius: 14px;
    color: var(--text-2);
    font-size: 13px;
    text-align: center;
    transition: border-color 0.15s, color 0.15s, padding 0.2s;
}

.pl-drop.is-empty .pl-drop-hint {
    padding: 70px 22px;
}

.pl-drop.over .pl-drop-hint {
    border-color: var(--accent);
    color: var(--text);
}

.drop-marker {
    height: 3px;
    margin: -4.5px 4px;
    border-radius: 3px;
    background: var(--accent);
}

.pl-row {
    display: grid;
    grid-template-columns: 20px 22px 72px minmax(0, 1fr) auto 32px;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-bg);
    transition: border-color 0.15s, background 0.6s, opacity 0.15s;
}

.pl-row:hover {
    border-color: var(--border-strong);
}

.pl-row.dragging {
    opacity: 0.4;
}

.pl-row.flash {
    background: var(--live-soft);
}

.pl-num {
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.pl-thumb {
    width: 72px;
    height: 44px;
    border-radius: 7px;
    overflow: hidden;
    background: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size;
}

.pl-thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pl-thumb > .thumb-empty,
.lib-thumb > .thumb-empty {
    width: 100%;
    height: 100%;
    background: var(--surface);
}

.pl-row-info {
    min-width: 0;
}

.pl-row-info strong {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-row-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
}

.pl-row-info span .icon {
    width: 13px;
    height: 13px;
}

.pl-dur {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 230px;
}

.dur-step {
    width: 28px;
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--panel-bg);
    color: var(--text-2);
    font-size: 15px;
    line-height: 1;
}

.dur-step:hover {
    background: var(--surface);
    color: var(--text);
}

.pl-dur .dur-input {
    width: 64px;
    height: 34px;
    padding: 0 4px;
    text-align: center;
    -moz-appearance: textfield;
}

.dur-input::-webkit-outer-spin-button,
.dur-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dur-unit {
    margin-left: 2px;
    font-size: 12px;
    color: var(--text-2);
}

.dur-hint {
    flex-basis: 100%;
    text-align: right;
    font-size: 11px;
    color: var(--text-3);
}

/* ---------- Bibliotheek ---------- */
.segmented.lib-tabs,
.segmented.full {
    display: flex;
}

.segmented.lib-tabs label,
.segmented.full label {
    flex: 1;
}

.segmented.lib-tabs span,
.segmented.full span {
    width: 100%;
    justify-content: center;
    padding: 0 8px;
    font-size: 12.44px;
}

.lib-tabs {
    margin-bottom: 10px;
}

.lib-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 10px -3.6px 0;
    padding: 0 4px 4px;
}

.lib-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-bg);
    cursor: grab;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.lib-row:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.lib-row:active {
    cursor: grabbing;
}

.lib-row.dragging {
    opacity: 0.5;
}

.lib-row.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lib-row[hidden] {
    display: none;
}

.lib-thumb {
    width: 52px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size;
}

.lib-thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lib-info {
    flex: 1;
    min-width: 0;
}

.lib-info strong {
    display: block;
    font-size: 12.44px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lib-info small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lib-row .square-btn {
    width: 28px;
    height: 28px;
}

.lib-row .square-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- Layouts-overzicht en nieuw formaat ---------- */
.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

.layout-card-stage {
    aspect-ratio: 16 / 10;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.layout-card:hover .layout-card-stage {
    transform: translateY(-2.7px);
    box-shadow: var(--shadow);
}

.layout-card-stage .layout-thumb {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.create-panel {
    margin-bottom: 24px;
}

.create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 20px;
    align-items: start;
}

.create-grid .custom-size {
    grid-column: 2;
}

.format-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.format-opt {
    position: relative;
}

.format-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 10px;
    border: 1.5px solid var(--border-strong);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.format-card strong {
    font-size: 13px;
}

.format-card small {
    font-size: 11.44px;
    color: var(--text-2);
}

.format-shape {
    display: block;
    height: 42px;
    max-width: 80%;
    margin-bottom: 6px;
    border: 2px solid var(--text);
    border-radius: 4px;
}

.format-shape.dashed {
    border-style: dashed;
}

.format-opt input:checked + .format-card {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.format-opt input:focus-visible + .format-card {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.size-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.size-inputs .input {
    width: 120px;
}

/* ---------- Layout-editor ---------- */
.le-main {
    padding: 0;
    overflow: hidden;
}

.le-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.le-toolbar .title-input {
    flex: 0 1 280px;
    width: auto;
    margin-left: 0;
    font-size: 17px;
}

.le-status {
    font-size: 12px;
    color: var(--text-3);
}

.le-status.dirty {
    color: var(--warning);
    font-weight: 600;
}

.le-spacer {
    flex: 1;
}

.le-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--surface);
    background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
    background-size: 18px 18px;
}

.le-canvas {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    outline: none;
    touch-action: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.le-canvas.over {
    box-shadow: 0 0 0 3px var(--accent), 0 10px 40px rgba(0, 0, 0, 0.25);
}

.le-el {
    position: absolute;
    cursor: move;
    user-select: none;
}

.le-el img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.le-el:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.le-el.selected {
    box-shadow: 0 0 0 2px #0a84ff;
}

.le-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    background: rgba(120, 120, 128, 0.4);
    color: #fff;
    font-size: 12px;
    text-align: center;
}

.le-tag {
    position: absolute;
    left: 6px;
    top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10.56px;
    font-weight: 600;
    pointer-events: none;
}

.le-tag .icon {
    width: 12px;
    height: 12px;
}

.le-h {
    position: absolute;
    z-index: 2;
    width: 11px;
    height: 11px;
    border: 2px solid #0a84ff;
    border-radius: 3px;
    background: #fff;
}

.le-h-nw { left: 2px; top: 2px; cursor: nwse-resize; }
.le-h-n { left: calc(50% - 5px); top: 2px; cursor: ns-resize; }
.le-h-ne { right: 2px; top: 2px; cursor: nesw-resize; }
.le-h-e { right: 2px; top: calc(50% - 5px); cursor: ew-resize; }
.le-h-se { right: 2px; bottom: 2px; cursor: nwse-resize; }
.le-h-s { left: calc(50% - 5px); bottom: 2px; cursor: ns-resize; }
.le-h-sw { left: 2px; bottom: 2px; cursor: nesw-resize; }
.le-h-w { left: 2px; top: calc(50% - 5px); cursor: ew-resize; }

.le-size {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 2px 6px;
    border-radius: 5px;
    background: #0a84ff;
    color: #fff;
    font-size: 10.56px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.le-empty {
    position: absolute;
    inset: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.le-empty .icon {
    width: 28px;
    height: 28px;
}

.le-foot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-2);
}

.le-props .field {
    margin-bottom: 12px;
}

.le-prop-media {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 10px;
    background: var(--surface);
}

.prop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.prop span {
    display: block;
    margin-bottom: 4px;
    font-size: 11.44px;
    color: var(--text-2);
}

.prop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.prop-actions .btn {
    justify-content: flex-start;
    padding: 0 10px;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-row input[type="color"] {
    width: 42px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--panel-bg);
    cursor: pointer;
}

.kv.small {
    grid-template-columns: 90px 1fr;
    gap: 6px 10px;
    font-size: 12.44px;
}

/* ---------- Scherm koppelen ---------- */
.pair-help {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13.56px;
}

.pair-help > div {
    flex: 1;
    min-width: 0;
}

.pair-help label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 500;
}

.pair-step {
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
}

.input.code-input {
    height: 58px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.code-input::placeholder {
    color: var(--text-3);
    font-weight: 500;
}

/* ---------- Apps ---------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
}

.app-card > div {
    flex: 1;
    min-width: 0;
}

.app-card h4 {
    margin: 0 0 3px;
    font-size: 15px;
}

.app-card p {
    margin: 0;
    font-size: 12.44px;
    color: var(--text-2);
}

.app-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-icon .icon {
    width: 22px;
    height: 22px;
}

/* ---------- Kaart in grijstinten (OpenStreetMap) ---------- */
.map-box .leaflet-tile-pane {
    filter: grayscale(1) contrast(0.95) brightness(1.04);
}

[data-theme="dark"] .map-box .leaflet-tile-pane {
    filter: grayscale(1) invert(1) brightness(0.85) contrast(0.9);
}

/* ---------- Responsief (versie 2) ---------- */
@media (max-width: 1380px) {
    .editor-grid {
        grid-template-columns: 220px minmax(0, 1fr) 290px;
    }
}

@media (max-width: 1100px) {
    .editor-grid {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    .pane-left {
        max-height: 280px;
    }

    .pane-main {
        min-height: 60vh;
    }

    .le-main {
        height: 70vh;
    }

    .pane-right {
        max-height: 80vh;
    }

    .create-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .create-grid .custom-size {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    :root {
        --player-h: 0px;
    }

    .pl-row {
        grid-template-columns: 18px 56px minmax(0, 1fr) 28px;
    }

    .pl-num {
        display: none;
    }

    .pl-thumb {
        width: 56px;
        height: 36px;
    }

    .pl-dur {
        grid-column: 2 / -1;
        justify-content: flex-start;
        max-width: none;
    }

    .dur-hint {
        text-align: left;
    }

    .pl-head {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .pl-row .js-remove-item {
        grid-row: 1;
        grid-column: 4;
    }
}

/* =====================================================================
   Versie 3: bovenbalk over de volle breedte, Publiceren, schermweergaves,
   momentopnames, overgangen, tekst en vormen, templates, opslaan-melding
   ===================================================================== */

/* ---------- Bovenbalk over de volle breedte ---------- */
body.app {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--right-w);
    grid-template-rows: var(--topbar-h) minmax(0, 1fr);
    grid-template-areas:
        "sidebar top top"
        "sidebar main right";
}

.topbar {
    grid-area: top;
    min-width: 0;
}

.top-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.rp-scroll {
    padding-top: 6px;
}

.btn-publish {
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 600;
}

.btn.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

@media (max-width: 1380px) {
    .rightpanel {
        top: var(--topbar-h);
        bottom: 0;
    }
}

@media (max-width: 560px) {
    .btn-publish .js-publish-label {
        display: none;
    }

    .btn-publish {
        width: 38px;
        padding: 0;
    }
}

/* ---------- Momentopnames (in plaats van grijze vlakken) ---------- */
.snap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0b0b0c;
    container-type: size;
}

.snap > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.snap .layout-thumb {
    width: min(100cqw, calc(100cqh * var(--r, 1.7778)));
    border-radius: 0;
}

.snap-empty {
    color: rgba(255, 255, 255, 0.4);
}

.snap-empty .icon {
    width: 30px;
    height: 30px;
}

.media-card.is-offline .cover {
    opacity: 1;
}

.media-card.is-offline .snap {
    filter: grayscale(0.35) brightness(0.92);
}

.list-snap {
    position: relative;
    display: block;
    width: 72px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.q-snap {
    position: relative;
    width: 64px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.screen-preview .snap .icon {
    width: 34px;
    height: 34px;
}

/* Tekst en vormen in kleine voorbeelden */
.layout-thumb {
    container-type: inline-size;
}

.lt-el {
    position: absolute;
    box-sizing: border-box;
}

/* ---------- Schermen: blokken, lijst, selectie, pagina's ---------- */
.list-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.list-toolbar .chips {
    margin-bottom: 12px;
}

.view-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.per-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.44px;
}

.per-form .select-sm {
    width: 84px;
}

.seg-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.seg-link:hover {
    color: var(--text);
}

.seg-link.active {
    background: var(--panel-bg);
    color: var(--text);
    box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

.screen-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.screen-card {
    position: relative;
}

.screen-card h4 a {
    color: inherit;
}

.screen-card .card-badge {
    top: auto;
    bottom: 10px;
}

.screen-card.is-selected .cover {
    box-shadow: 0 0 0 3px var(--accent);
}

.sel-box {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 3;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

.screen-card:hover .sel-box,
.screen-card.is-selected .sel-box,
[data-screen-selection]:has(.js-sel:checked) .sel-box {
    opacity: 1;
}

.sel-box .checkbox {
    accent-color: #111;
}

.bulk-bar .btn:not(.btn-light) {
    background: transparent;
    color: inherit;
    border-color: rgba(127, 127, 127, 0.45);
}

.btn-light {
    background: var(--panel-bg);
    color: var(--text);
    border-color: transparent;
}

.btn-light:hover {
    background: var(--surface);
}

.screen-table .track-cell {
    color: inherit;
}

.list-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    font-size: 12.44px;
}

.pager {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pager-num,
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.pager-num:hover,
.pager-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.pager-num.active {
    background: var(--accent);
    color: var(--accent-contrast);
}

.pager-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pager-gap {
    padding: 0 4px;
    color: var(--text-3);
}

.format-picker.compact .format-card {
    padding: 10px 6px;
}

.format-picker.compact .format-shape {
    height: 30px;
}

.js-format .size-inputs,
.le-size-inputs {
    margin-top: 10px;
    flex-wrap: wrap;
}

.js-format .size-inputs .input {
    width: 110px;
}

/* ---------- Overgangen ---------- */
.transition-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 8px;
}

.trans-opt {
    position: relative;
}

.trans-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.trans-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 10px;
    border: 1.5px solid var(--border-strong);
    border-radius: 12px;
    font-size: 12.44px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.trans-opt input:checked + .trans-card {
    border-color: var(--accent);
    background: var(--surface);
}

.trans-opt input:focus-visible + .trans-card {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.trans-demo {
    position: relative;
    height: 46px;
    border-radius: 6px;
    overflow: hidden;
    background: #1d1d1f;
}

.trans-demo i {
    position: absolute;
    inset: 0;
}

.trans-demo .a {
    background: linear-gradient(135deg, #3d5a80, #1d1d1f);
}

.trans-demo .b {
    background: linear-gradient(135deg, #c47b54, #7a3f22);
    opacity: 0;
}

.t-fade .b { animation: tr-fade 2.6s ease-in-out infinite; }
.t-cut .b { animation: tr-cut 2.6s steps(1) infinite; }
.t-slide .b { opacity: 1; animation: tr-slide 2.6s cubic-bezier(.4, 0, .2, 1) infinite; }
.t-up .b { opacity: 1; animation: tr-up 2.6s cubic-bezier(.4, 0, .2, 1) infinite; }
.t-zoom .b { animation: tr-zoom 2.6s ease-in-out infinite; }

@keyframes tr-fade {
    0%, 30% { opacity: 0; }
    50%, 85% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes tr-cut {
    0% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes tr-slide {
    0%, 30% { transform: translateX(100%); }
    50%, 90% { transform: none; }
    100% { transform: translateX(-100%); }
}

@keyframes tr-up {
    0%, 30% { transform: translateY(100%); }
    50%, 90% { transform: none; }
    100% { transform: translateY(-100%); }
}

@keyframes tr-zoom {
    0%, 30% { opacity: 0; transform: scale(1.18); }
    50%, 85% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .trans-demo .b {
        animation: none !important;
        opacity: 0.6;
        transform: none;
    }
}

/* ---------- Layout-editor: tekst, vormen, templates ---------- */
.editor-grid.editor-2 {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.le-canvas {
    container-type: inline-size;
}

.le-content {
    pointer-events: none;
}

.le-insert {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12.44px;
}

.ins-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-weight: 800;
    font-size: 14px;
    font-family: Georgia, serif;
}

.ins-rect::before,
.ins-ellipse::before,
.ins-line::before {
    content: "";
    display: block;
    border: 2px solid currentColor;
}

.ins-rect::before {
    width: 14px;
    height: 10px;
    border-radius: 2px;
}

.ins-ellipse::before {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.ins-line::before {
    width: 14px;
    height: 0;
    border-width: 1px 0;
}

.le-text {
    cursor: move;
}

.prop-section {
    margin: 16px 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.le-props .textarea {
    min-height: 74px;
    font-size: 13px;
}

.le-props .select.input-sm {
    height: 36px;
    padding-right: 30px;
    background-position: right 8px center;
}

.num-unit {
    position: relative;
    display: block;
}

.num-unit .input {
    padding-right: 28px;
}

.num-unit em {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    font-size: 11px;
    color: var(--text-3);
    pointer-events: none;
}

.color-row .input-sm {
    flex: 1;
    min-width: 0;
}

.color-row input[type="color"]:disabled,
.color-row .input:disabled {
    opacity: 0.4;
}

.none-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    cursor: pointer;
}

.segmented.full span .icon {
    width: 15px;
    height: 15px;
}

.tpl-row {
    width: 100%;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.tpl-thumb {
    width: 96px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1d1d1f;
    container-type: size;
}

.tpl-thumb .layout-thumb {
    width: min(100cqw, calc(100cqh * var(--r, 1.7778)));
    border-radius: 0;
}

/* ---------- Melding: nog niet opgeslagen ---------- */
.unsaved-pop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 950;
    display: flex;
    gap: 12px;
    width: 370px;
    max-width: calc(100vw - 32px);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-bg);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease;
}

.unsaved-pop[hidden] {
    display: none;
}

.unsaved-ic {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--warning-soft);
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.unsaved-text strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.unsaved-text > span {
    display: block;
    font-size: 12.44px;
    line-height: 1.45;
    color: var(--text-2);
}

.unsaved-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

body:has(.unsaved-pop:not([hidden])) .toasts {
    bottom: 170px;
}

/* ---------- Kaart: Kadaster (BRT grijs) ---------- */
.map-box .leaflet-tile-pane {
    filter: none;
}

[data-theme="dark"] .map-box .leaflet-tile-pane {
    filter: invert(1) brightness(0.85) contrast(0.9);
}

/* ---------- Responsief (versie 3) ---------- */
@media (max-width: 1380px) {
    .editor-grid.editor-2 {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .screen-grid.cols-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

@media (max-width: 900px) {
    .screen-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .view-tools {
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .screen-grid.cols-4 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =====================================================================
   Versie 4: publiceren, white label, apps (Klok)
   ===================================================================== */

/* ---------- Publiceren ---------- */
.btn-publish {
    position: relative;
}

.publish-dot {
    position: absolute;
    top: -2.7px;
    right: -2.7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
    border: 2px solid var(--app-bg);
}

.publish-dot[hidden] {
    display: none;
}

.badge.unpub {
    margin-top: 6px;
}

/* ---------- Logo van een white label-klant ---------- */
.sidebar-logo .tenant-logo {
    width: auto;
    max-width: 160px;
    max-height: 52px;
    object-fit: contain;
}

.tenant-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-align: center;
    line-height: 1.15;
}

.brand-center .tenant-logo {
    width: auto;
    max-width: 220px;
    max-height: 80px;
    object-fit: contain;
}

.brand-center .tenant-name {
    font-size: 26px;
}

/* ---------- Beheer > White label ---------- */
.wl-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-2);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.wl-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.wl-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 28px;
}

.wl-file {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.wl-file > div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wl-preview {
    width: 150px;
    height: 84px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 12px;
}

.wl-preview.dark {
    background: #0b0b0c;
}

.wl-preview img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.input-file {
    font: inherit;
    font-size: 13px;
    color: var(--text-2);
}

.input-file::file-selector-button {
    height: 34px;
    padding: 0 12px;
    margin-right: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.wl-sample {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 14px;
    border-radius: 12px;
    background: var(--surface);
}

.wl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand);
}

/* ---------- Apps ---------- */
.app-card.is-soon {
    opacity: 0.7;
}

.cover.app-cover {
    display: block;
    background: #0b0b0c;
}

.app-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: start;
}

.app-editor-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.app-editor-form .card + .card {
    margin-top: 0;
}

.app-editor-preview {
    position: sticky;
    top: 0;
}

.app-preview-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--surface);
    background-image: linear-gradient(45deg, var(--surface-2) 25%, transparent 25%), linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--surface-2) 75%), linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -9px, -9px 0;
    box-shadow: var(--shadow);
}

.app-preview-stage.portrait {
    aspect-ratio: 9 / 16;
    max-width: 320px;
    margin: 0 auto;
}

.app-preview {
    position: absolute;
    inset: 0;
}

/* Apps in kleine voorbeelden */
.pl-thumb,
.lib-thumb,
.q-art {
    position: relative;
}

.snap-app,
.lt-app {
    container-type: normal;
}

.le-appbox {
    position: absolute;
    inset: 0;
}

.toggle-list .toggle-row {
    font-size: 13.56px;
}

@media (max-width: 1100px) {
    .app-editor,
    .wl-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-editor-preview {
        position: static;
    }
}

/* =====================================================================
   Versie 5: layout-editor met tabbladen en raster, verwijderen, uploadvenster
   ===================================================================== */

/* ---------- Layout-editor: rechterpaneel ---------- */
.editor-grid.editor-2 {
    grid-template-columns: minmax(0, 1fr) 390px;
}

.le-side {
    gap: 12px;
}

.le-tabs span {
    gap: 5px;
    padding: 0 6px;
    font-size: 12px;
}

.le-tabs span .icon {
    width: 14px;
    height: 14px;
}

.le-side .js-lib-search {
    flex-shrink: 0;
}

/* Elk tabblad scrolt zelf; de ruimte voor de scrollbalk staat altijd vast (geen verspringen) */
.le-tab {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
    margin: 0 -7.2px 0 0;
    padding: 2px 6px 4px 0;
}

.le-tab-hint {
    margin: 0 0 10px;
}

.lib-list {
    scrollbar-gutter: stable;
}

/* Raster met kaartjes (media, templates, apps) */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.lib-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-bg);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: grab;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

button.lib-card {
    cursor: pointer;
}

.lib-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.lib-card.dragging {
    opacity: 0.5;
}

.lib-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.lib-card[hidden] {
    display: none;
}

.lib-card-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #1d1d1f;
    container-type: size;
}

.lib-card-thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lib-card-thumb > .thumb-empty {
    width: 100%;
    height: 100%;
    background: var(--surface);
}

.lib-card-thumb .layout-thumb {
    width: min(100cqw, calc(100cqh * var(--r, 1.7778)));
    border-radius: 0;
}

.lib-card-info {
    min-width: 0;
    padding: 0 2px;
}

.lib-card-info strong {
    display: block;
    font-size: 12.44px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lib-card-info small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lib-card-add {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

.lib-card:hover .lib-card-add,
.lib-card:focus-within .lib-card-add {
    opacity: 1;
}

.lib-card-add:disabled {
    display: none;
}

/* ---------- Afspeellijsten: verwijderen in de lijst ---------- */
.pane-row {
    position: relative;
}

.pane-row .pane-item {
    padding-right: 40px;
}

.pane-row-del {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.15s;
}

.pane-row:hover .pane-row-del,
.pane-row:focus-within .pane-row-del {
    opacity: 1;
}

/* ---------- Bevestigen ---------- */
.modal.modal-sm {
    max-width: 420px;
}

.confirm-text {
    margin: 0;
    color: var(--text-2);
    line-height: 1.55;
}

.btn-danger-solid,
.btn-danger-solid:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-danger-solid:hover {
    filter: brightness(0.94);
}

/* ---------- Uploadvenster ---------- */
.upload-tabs {
    margin-bottom: 18px;
}

.dz-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

#uploadModal .dropzone {
    padding: 40px 24px;
}

@media (max-width: 1380px) {
    .editor-grid.editor-2 {
        grid-template-columns: minmax(0, 1fr) 340px;
    }
}

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

    .le-side {
        max-height: 80vh;
    }
}

@media (hover: none) {
    .lib-card-add,
    .pane-row-del {
        opacity: 1;
    }
}

/* =====================================================================
   Versie 6: adres automatisch invullen, Vormen-menu, uitlijnhulp
   ===================================================================== */

/* ---------- Adres ---------- */
.addr-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.addr-status {
    margin: -3.6px 0 14px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--surface);
    font-size: 12.44px;
    line-height: 1.45;
    color: var(--text-2);
}

.addr-status[hidden] {
    display: none;
}

.addr-status.ok {
    background: var(--live-soft);
    color: var(--text);
}

.addr-status.warn {
    background: var(--warning-soft);
    color: var(--text);
}

.addr-status.info {
    background: var(--surface);
    color: var(--text);
}

.addr-status.busy {
    color: var(--text-3);
}

.link-btn {
    margin-left: 6px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---------- Vormen-menu ---------- */
.le-shapes .btn .icon {
    width: 13px;
    height: 13px;
    margin-left: -2px;
}

.le-shapes .shape-menu {
    left: 0;
    right: auto;
    min-width: 230px;
    z-index: 300;
}

.ins-shapes::before {
    content: "";
    display: block;
    width: 11px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 3px;
    box-shadow: 4px 4px 0 -1px var(--panel-bg), 4px 4px 0 1px currentColor;
}

.shape-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 18px;
    flex-shrink: 0;
}

.shape-ic::before {
    content: "";
    display: block;
    background: var(--text);
}

.s-rect::before {
    width: 20px;
    height: 13px;
}

.s-rounded::before {
    width: 20px;
    height: 13px;
    border-radius: 5px;
}

.s-circle::before {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.s-oval::before {
    width: 21px;
    height: 13px;
    border-radius: 50%;
}

.s-line::before {
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.s-vline::before {
    width: 3px;
    height: 17px;
    border-radius: 2px;
}

/* ---------- Uitlijnhulp ---------- */
.snap-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.44px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.le-guides {
    position: absolute;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.le-guide {
    position: absolute;
    background: #ff2d78;
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.6);
}

.le-guide.v {
    top: 0;
    bottom: 0;
    width: 1px;
    margin-left: -0.5px;
}

.le-guide.h {
    left: 0;
    right: 0;
    height: 1px;
    margin-top: -0.5px;
}

/* =====================================================================
   Zoekbare keuzelijst (.js-search-select)
   ===================================================================== */
.ss-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

.ss {
    position: relative;
    width: 100%;
}

.ss-toggle {
    display: flex;
    align-items: center;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.ss-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-label.faint {
    color: var(--text-2);
}

.ss-pop {
    position: fixed;
    z-index: 1200;
    max-width: calc(100vw - 32px);
    background: var(--panel-bg);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.ss-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}

.ss-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.ss-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.ss-group {
    padding: 10px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.ss-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.ss-opt span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-opt.active {
    background: var(--surface);
}

.ss-opt.selected {
    font-weight: 600;
}

.ss-opt.disabled {
    color: var(--text-3);
    cursor: default;
}

.ss-empty {
    padding: 14px 10px;
    font-size: 13px;
    color: var(--text-2);
}

/* Apps: zoekbalk en logo's op de tegels */
.app-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
    max-width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--panel-bg);
    color: var(--text-2);
}

.app-search:focus-within {
    border-color: var(--text);
}

.app-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.app-icon .app-logo {
    width: 34px;
    height: 34px;
    display: block;
}

.app-card[hidden],
.media-card[hidden] {
    display: none !important;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 6px 12px;
}

.feed-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.feed-grid label:has(input:checked) {
    border-color: var(--text);
    background: var(--surface);
    font-weight: 600;
}

/* Layout-editor: afbeeldingsvak uit een splitscreen-template */
.le-slot {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    pointer-events: none;
    border: 2px dashed rgba(255, 255, 255, 0.25);
}

.le-slot strong {
    color: #fff;
    font-size: 14px;
}

.le-slot .icon {
    width: 28px;
    height: 28px;
}

/* PDF in de mediabibliotheek: hele pagina tonen */
.cover-img.contain {
    object-fit: contain;
    background: #1d1d1f;
}

/* =====================================================================
   Adminconsole en "Inloggen als"
   ===================================================================== */
.console-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.console-title span {
    font-weight: 400;
    color: var(--text-2);
}

body.console .topbar {
    justify-content: space-between;
}

.impersonate-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--warning-soft);
    color: var(--text);
    font-size: 14px;
}

.impersonate-bar .btn {
    margin-left: auto;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.filter-bar .ss {
    width: 260px;
}

.stat .value small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

/* =====================================================================
   Beveiliging: 2FA, passkeys, inloggen
   ===================================================================== */
.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-title-row h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.inline-pass {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-pass .input {
    flex: 1 1 200px;
    min-width: 0;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 4px;
}

.recovery-codes code {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface);
    font-size: 15px;
    letter-spacing: 0.06em;
    text-align: center;
}

.totp-setup {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.totp-qr {
    flex: none;
    width: 168px;
    height: 168px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
}

.totp-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.totp-setup > div:last-child {
    flex: 1 1 240px;
    min-width: 0;
}

.totp-secret {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--surface);
    font-size: 13px;
    letter-spacing: 0.08em;
    word-break: break-all;
}

.auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--text-3);
    font-size: 13px;
}

.auth-or::before,
.auth-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-alt {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
}

/* Nieuwe layout: leeg beginnen of een template kiezen */
.new-layout-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 8px 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .new-layout-head {
        grid-template-columns: 1fr;
    }
}

.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.tpl-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.tpl-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tpl-thumb .layout-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    aspect-ratio: var(--tpl-ratio, 16/9);
    border-radius: 6px;
    overflow: hidden;
}

.tpl-tile:hover .tpl-thumb,
.tpl-tile:focus-visible .tpl-thumb {
    border-color: var(--text);
    box-shadow: var(--shadow);
}

.tpl-info strong {
    display: block;
    font-size: 14px;
}

.tpl-info small {
    color: var(--text-2);
    font-size: 12.5px;
}

.tpl-blank-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    color: var(--text-2);
}

.tpl-blank-in .icon {
    width: 28px;
    height: 28px;
    color: var(--text);
}

.tpl-blank-in strong {
    color: var(--text);
}

.tpl-blank .tpl-thumb {
    border-style: dashed;
    background: var(--panel-bg);
}

.lt-el.lt-slot {
    background: repeating-linear-gradient(45deg, #2a2a2d 0 10px, #333337 10px 20px) !important;
}

.tpl-tile,
.tpl-thumb {
    width: 100%;
}

.tpl-thumb .layout-thumb {
    height: 100%;
    width: auto;
}

/* Voorbeeld in de tegel: passend in het vak, verhouding van het gekozen formaat */
.tpl-thumb {
    container-type: size;
    padding: 0;
}

.tpl-thumb .layout-thumb {
    width: min(88cqw, calc(84cqh * var(--r, 1.7778)));
    height: auto;
}

.tpl-tile {
    display: block;
}

.tpl-tile .tpl-thumb {
    display: flex;
    aspect-ratio: 16 / 10;
    height: auto;
}

.tpl-tile .tpl-info {
    display: block;
    margin-top: 10px;
}

/* Taalkeuze op de inlogpagina */
.lang-switch {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 14px;
}

.lang-switch a {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
}

.lang-switch a.active {
    background: var(--panel-bg);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* Adminconsole: Downloads */
.dl-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dl-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.dl-item.is-latest {
    border-color: var(--text);
}

.dl-icon {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-info {
    flex: 1 1 260px;
    min-width: 0;
}

.dl-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.dl-title strong {
    font-size: 15px;
    word-break: break-all;
}

.dl-info .faint {
    font-size: 13px;
}

.dl-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dl-build {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 8px 8px;
}

.dl-build ol,
.dl-steps {
    margin: 10px 0 14px;
    padding-left: 20px;
    line-height: 1.6;
}

.dl-build li,
.dl-steps li {
    margin-bottom: 8px;
}
