:root {
    color-scheme: light;

    /* colors */
    --bg: #f4f6f8;
    --panel: #ffffff;
    --border: #dfe3e8;
    --text: #1a1f24;
    --muted: #62707c;
    --primary: #0a7d2c;
    /* Derived from --primary rather than a fixed hex, so overriding
       --primary (e.g. from the club's huisstijl primary color, see
       base.html.twig) automatically darkens hover/pressed states too. */
    --primary-dark: color-mix(in srgb, var(--primary) 80%, black);
    /* Fixed green regardless of huisstijl - "success" is a semantic status
       color (badges, flash messages), not a brand accent. */
    --success: #0a7d2c;
    --success-dark: #075e21;
    --danger: #c0392b;
    /* "Reversible, but think first" - deactivating, removing something from
       a slideshow. Red stays reserved for the trash can, so that "gone for
       good" keeps a look nothing else has. Same hex as .stale-warning, which
       already meant exactly this; white on it measures 5.5:1, comfortably
       past the 4.5:1 AA floor (re-measure if you ever retune the shade). */
    --warning: #b1481f;
    --warning-dark: color-mix(in srgb, var(--warning) 80%, black);
    --hover-bg: #eef1f3;

    /* spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;

    /* radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* shadow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

/* The browser's own `[hidden] { display: none }` lives in the UA stylesheet, so
   *any* author rule setting `display` beats it - `.btn` is `inline-block`, and
   a hidden button therefore stayed fully visible. Found on /account, where all
   three notification buttons showed at once; slide-render.css had to learn the
   same lesson separately for `.sl-pg-row`. `!important` because the whole point
   is to outrank whatever the element's own class says. */
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

a { color: var(--primary); }

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

nav.sidebar {
    width: 220px;
    background: #101418;
    color: #d7dde2;
    flex-shrink: 0;
    padding: 1.25rem 0;
    transition: width 0.15s ease;
    /* Keep the menu in view on long pages. align-self is load-bearing, not
       decoration: .layout is a flex container, so without it the sidebar is
       stretched to the full page height and sticky never has anywhere to
       travel. A fixed 100vh then guarantees the dark background covers the
       whole viewport while stuck, and overflow-y catches a viewport too
       short for every menu item. The mobile block below overrides all of
       this with position: fixed. */
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
}

nav.sidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.75rem 1rem 1.25rem;
    border-bottom: 1px solid #23282e;
    margin-bottom: 0.5rem;
}

/* The lockup carries the wordmark itself, so the sidebar shows it whole when
   expanded and falls back to the bare symbol in the 64px rail. */
nav.sidebar .brand {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0;
    background: none;
}
nav.sidebar .brand:hover { background: none; }
/* Deliberately no `display` on the shared img rule: `nav.sidebar .brand img`
   outranks `nav.sidebar .brand-symbol` (an extra element beats nothing at the
   same class count), so setting it there would force both logos visible at
   once and squeeze the collapse button out of the header. */
nav.sidebar .brand img { width: auto; }
nav.sidebar .brand-lockup { display: block; height: 26px; }
nav.sidebar .brand-symbol { display: none; height: 24px; }

nav.sidebar .sidebar-toggle {
    flex-shrink: 0;
    display: flex;
    background: none;
    border: none;
    color: #b7c0c9;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
}
nav.sidebar .sidebar-toggle:hover { background: #1c2126; color: #fff; }
nav.sidebar .sidebar-toggle svg { width: 20px; height: 20px; }

nav.sidebar a, nav.sidebar button.link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 1.25rem;
    color: #b7c0c9;
    text-decoration: none;
    font-size: 0.92rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}
nav.sidebar a svg, nav.sidebar button.link svg { flex-shrink: 0; width: 18px; height: 18px; }
nav.sidebar a:hover, nav.sidebar a.active, nav.sidebar button.link:hover { background: #1c2126; color: #fff; }
nav.sidebar form { padding: 0; }

.sidebar-toggle:focus-visible,
nav.sidebar a:focus-visible,
nav.sidebar button.link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* A <button> since it opens the version popup, but it must keep reading as the
   quiet footer line it has always been - so the button's own chrome is reset
   away rather than styled. */
nav.sidebar .sidebar-version {
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem 0;
    border-top: 1px solid #23282e;
    color: #5f6a74;
    font-size: 0.75rem;
    white-space: nowrap;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    font-family: inherit;
    cursor: pointer;
}

nav.sidebar .sidebar-version:hover { color: #8b959e; }

nav.sidebar .sidebar-credit {
    padding: 0 1.25rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

nav.sidebar .sidebar-credit a {
    color: #5f6a74;
}

nav.sidebar .sidebar-credit a:hover {
    color: var(--primary);
}

/* collapsed rail (desktop, persisted via localStorage) */
html[data-sidebar-collapsed="1"] nav.sidebar { width: 64px; }
html[data-sidebar-collapsed="1"] nav.sidebar .label,
html[data-sidebar-collapsed="1"] nav.sidebar .brand-lockup { display: none; }
html[data-sidebar-collapsed="1"] nav.sidebar .brand-symbol { display: block; }
/* The symbol (34px) and the toggle (~26px) plus a gap don't fit side by side
   in a 64px rail, so they stack instead of being squeezed against the edges. */
html[data-sidebar-collapsed="1"] nav.sidebar .sidebar-header {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0 1rem;
}
html[data-sidebar-collapsed="1"] nav.sidebar a,
html[data-sidebar-collapsed="1"] nav.sidebar button.link { justify-content: center; padding: 0.55rem; }

.sidebar-backdrop { display: none; }
.topbar { display: none; }

main.content { flex: 1; padding: 2rem; max-width: 1100px; }

@media (max-width: 768px) {
    nav.sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 240px !important;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 60;
        overflow-y: auto;
    }
    nav.sidebar.mobile-open { transform: translateX(0); }

    /* the desktop collapsed-rail state must not affect the mobile off-canvas menu */
    html[data-sidebar-collapsed="1"] nav.sidebar .label { display: inline; }
    html[data-sidebar-collapsed="1"] nav.sidebar .brand-lockup { display: block; }
    html[data-sidebar-collapsed="1"] nav.sidebar .brand-symbol { display: none; }
    html[data-sidebar-collapsed="1"] nav.sidebar .sidebar-header { flex-direction: row; justify-content: space-between; gap: 0.5rem; padding: 0 0.75rem 1rem 1.25rem; }
    html[data-sidebar-collapsed="1"] nav.sidebar a,
    html[data-sidebar-collapsed="1"] nav.sidebar button.link { justify-content: flex-start; padding: 0.55rem 1.25rem; }

    .sidebar-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 55;
    }

    .topbar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: var(--panel);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 40;
    }
    .topbar-toggle {
        display: flex;
        background: none;
        border: none;
        color: var(--text);
        cursor: pointer;
        padding: 0.25rem;
    }
    .topbar-brand { display: flex; align-items: center; }
    .topbar-brand img { display: block; height: 24px; width: auto; }

    main.content { padding: 1rem; max-width: 100%; }
}

h1 { font-size: 1.5rem; margin-top: 0; }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; }
tbody tr:hover { background: var(--hover-bg); }

.sortable-col { cursor: pointer; user-select: none; }
.sortable-col:hover { background: var(--hover-bg); }
.sortable-col:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.sortable-col[aria-sort="ascending"]::after { content: ' \25B2'; font-size: 0.75em; }
.sortable-col[aria-sort="descending"]::after { content: ' \25BC'; font-size: 0.75em; }

.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #eef1f3; color: var(--text); }
.btn.danger { background: var(--danger); }
.btn.success { background: var(--success); }
.btn.warning { background: var(--warning); }
.btn.success:hover { background: var(--success-dark); }
.btn.warning:hover { background: var(--warning-dark); }
.btn:disabled, .btn-icon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn:disabled:hover { background: var(--primary); }
.btn.secondary:disabled:hover { background: #eef1f3; }
.btn.danger:disabled:hover { background: var(--danger); }
.btn.success:disabled:hover { background: var(--success); }
.btn.warning:disabled:hover { background: var(--warning); }

/* Feedback while a form is being submitted - see the submit handler in
   base.html.twig. The spinner goes on every button; the note is opt-in via
   data-slow, for actions that run long enough that a spinner alone still
   reads as "frozen". */
.btn-spinner {
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-right: 0.45em;
    vertical-align: -0.05em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .btn-spinner { animation-duration: 2.4s; }
}

.slow-note {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

/* icon-only action buttons (used from Fase C onward) */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
}
.btn-icon:hover { background: var(--hover-bg); color: var(--text); }
.btn-icon.danger:hover { background: #f6e2e2; color: var(--danger); }
.btn-icon svg { width: 18px; height: 18px; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }

a.btn:focus-visible,
button.btn:focus-visible,
.btn-icon:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: #eef1f3;
}
.badge.active { background: #e2f6e7; color: var(--success-dark); }
.badge.inactive { background: #f6e2e2; color: var(--danger); }
/* "Speelt nu niet": switched on, but outside its publication window. Not red -
   red is for gone/off, and this is a temporary, self-resolving state. Same
   pairing as .badge.type-results below, which already uses --warning on this
   background. */
.badge.warning { background: #fbe7e0; color: var(--warning); }

/* Slide-type accent colors - purely a scanning aid in slide lists, not tied
   to club huisstijl (--primary changes per club, these stay fixed). */
.badge.type-text { background: #eef1f3; color: #4b5a66; }
.badge.type-image { background: #e3f0fc; color: #1c6aa8; }
.badge.type-video { background: #f2e7fb; color: #7a3fae; }
.badge.type-sponsor { background: #fdf0d9; color: #9c6a05; }
.badge.type-team { background: #e3f7f0; color: #147a52; }
.badge.type-program { background: #e0f4f7; color: #0e7490; }
.badge.type-results { background: #fbe7e0; color: #b1481f; }
.badge.type-standings { background: #ece7fb; color: #5b3fae; }
/* 6,2:1 (L 0,094 op L 0,841) - ruim boven de 4,5:1 van WCAG AA. */
.badge.type-club_standings { background: #fbe7f3; color: #9d2467; }

/* Applied to the row currently being dragged in a reorderable list (slideshow
   slides, infobord entries) - opacity + a huisstijl-colored tint/accent +
   a slight rightward shift, so it's obvious which row you're holding while
   the list live-reorders under it. box-shadow (not border-left) for the
   accent since a real border renders inconsistently on <tr>. */
.dragging {
    opacity: 0.6;
    background: color-mix(in srgb, var(--primary) 10%, white);
    box-shadow: inset 4px 0 0 var(--primary);
    transform: translateX(6px);
    cursor: grabbing;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    white-space: nowrap;
}
.row-actions form { display: inline-flex; }

/* Bulk action bar above the slides/sponsors listings. Sits outside the table
   (rows carry their own delete forms and forms can't nest) - the checkboxes
   join it via the HTML form="" attribute. */
.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
}
.bulk-bar select { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
.bulk-bar .bulk-count {
    font-size: 0.85rem;
    color: var(--muted);
    margin-right: 0.25rem;
    min-width: 8.5rem;
}
/* The buttons carry the huisstijl primary colour rather than .secondary's
   near-white grey: greyed-out-looking buttons on a toolbar that is *also*
   greyed out until something is selected read as permanently dead. Disabled
   styling comes from .btn:disabled. */
.bulk-bar select:disabled { opacity: 0.6; cursor: not-allowed; }

/* Keep the checkbox column as narrow as its content. The header cell must
   stay textually empty or the sortable script turns it into a sort trigger. */
.bulk-col { width: 1%; white-space: nowrap; }
.bulk-col input[type=checkbox] { display: block; margin: 0; }

/* Dashboard stat cards. Extracted from inline styles once the dashboard grew
   past four of them - .card's own margin-bottom is cleared because the grid
   already provides the gap. */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card { margin-bottom: 0; overflow: visible; }
/* A stat card that leads to its page is an <a>. It keeps the card's own text
   colours - the label and value must not turn link-blue - and says it is
   clickable with the border and a lift on hover instead. */
a.stat-card {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
    transform: translateY(-1px);
}
a.stat-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stat-card-label { color: var(--muted); font-size: 0.85rem; }
.stat-card-value { font-size: 1.8rem; font-weight: 700; }
.stat-card-value.is-alert { color: var(--danger); }
.stat-card-note { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.stat-card-note.is-alert { color: var(--warning); }
/* A value that is a timestamp rather than a number - the 1.8rem number size
   would wrap it onto three lines. */
.stat-card-value.is-text { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }

/* Client-side row filter above a table - markup in
   _macros/table_filter.html.twig, behaviour in base.html.twig. Wraps onto
   several lines on a phone; the search box takes the full width there. */
.table-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.6rem;
    margin-bottom: 0.75rem;
}
.table-filter-search {
    position: relative;
    flex: 0 1 20rem;
    min-width: 0;
}
@media (max-width: 768px) {
    .table-filter-search { flex-basis: 100%; }
}
.table-filter input,
.table-filter select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    background: var(--panel);
    color: var(--text);
    max-width: 100%;
}
/* Room for the magnifier on the left and the clear button on the right. */
.table-filter input {
    width: 100%;
    padding-left: 2rem;
    padding-right: 2.1rem;
}
/* Our own clear button replaces the browser's: WebKit draws one for
   type=search and Firefox doesn't, so relying on it was inconsistent. */
.table-filter input::-webkit-search-cancel-button,
.table-filter input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}
.table-filter input:focus,
.table-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.table-filter-search-icon {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    color: var(--muted);
    pointer-events: none;
}
.table-filter-clear {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.table-filter-clear:hover { background: var(--hover-bg); color: var(--text); }
.table-filter-clear:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.table-filter-clear svg { width: 16px; height: 16px; }
.table-filter-count { font-size: 0.82rem; color: var(--muted); }
.table-filter-empty { color: var(--muted); padding: 1rem 0.6rem; }
.table-filter-empty .btn { margin-left: 0.25rem; }

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}
.empty-state svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
    color: var(--border);
}
.empty-state p { margin: 0 0 1rem; font-size: 0.92rem; }
.empty-state p:last-child { margin-bottom: 0; }

.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.form-row label.required::after { content: ' *'; color: var(--danger); }

.form-row input[type=text], .form-row input[type=number], .form-row input[type=email],
.form-row input[type=password], .form-row input[type=date], .form-row input[type=time],
.form-row input[type=color], .form-row input[type=url], .form-row select, .form-row textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    background: var(--panel);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row textarea { min-height: 6rem; resize: vertical; }

.form-row input::placeholder, .form-row textarea::placeholder { color: var(--muted); opacity: 0.8; }

.form-row input:hover:not(:disabled, :focus), .form-row select:hover:not(:disabled, :focus),
.form-row textarea:hover:not(:disabled, :focus) {
    border-color: #c3cbd1;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 125, 44, 0.15);
}
.form-row input:disabled, .form-row select:disabled, .form-row textarea:disabled {
    background: var(--bg);
    color: var(--muted);
    cursor: not-allowed;
}

.form-row select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2362707c'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    cursor: pointer;
}

.form-row input[aria-invalid="true"], .form-row select[aria-invalid="true"], .form-row textarea[aria-invalid="true"] {
    border-color: var(--danger);
}
.form-row ul {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    color: var(--danger);
    font-size: 0.82rem;
}
.form-row .help-text { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }

/* checkboxes rendered as toggle switches (label first, then widget - matches Symfony's default form_row order) */
.form-row:has(> input[type=checkbox]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.form-row:has(> input[type=checkbox]) label { margin-bottom: 0; }
.form-row input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    margin: 0;
    border: none;
    border-radius: 999px;
    background-color: #ccd2d6;
    background-image: radial-gradient(circle closest-side, #fff 100%, transparent 0);
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: left 3px center;
    cursor: pointer;
    transition: background-color 0.15s ease, background-position 0.15s ease;
}
.form-row input[type=checkbox]:checked {
    background-color: var(--primary);
    background-position: right 3px center;
}
.form-row input[type=checkbox]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* A group of toggles (ChoiceType, multiple + expanded): Symfony renders them
   as a flat run of input, label, input, label inside one wrapper. Without a
   layout each label lands on its own line *under* its switch, and halfway
   down the list it is a guess which switch belongs to which label. Two
   columns pair them up: switch left, its label right. */
.form-row > div:has(> input[type=checkbox] + label) {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.45rem 0.65rem;
    align-items: center;
}
.form-row > div:has(> input[type=checkbox] + label) > label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* color pickers enhanced with a synced hex text field (see base.html.twig script) */
.color-field { display: flex; align-items: center; gap: 0.5rem; }
.color-field input[type=color] {
    width: 48px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: none;
    cursor: pointer;
}
.form-row input[type=text].color-field-hex {
    width: 120px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    text-transform: uppercase;
}

/* grouped form sections (Huisstijl, Slide, Sponsor forms) */
.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.form-section h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    font-weight: 600;
    margin: 0 0 1rem;
}

.flash { padding: 0.7rem 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-size: 0.9rem; }
.flash.success { background: #e2f6e7; color: var(--success-dark); }
.flash.error { background: #f6e2e2; color: var(--danger); }

code.url { background: #eef1f3; padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); }

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); font-weight: 600; }

/* WYSIWYG (Quill) editor: bigger by default, plus an optional fullscreen mode */
#slide-form-card { transition: max-width 0.15s ease; }
#slide-form-card.is-text-type { max-width: 820px; }

.editor-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}
.editor-label-row label { margin-bottom: 0; }

.editor-wrapper #quill-editor.ql-container { min-height: 320px; }
.editor-wrapper .ql-editor { min-height: 320px; }

.editor-backdrop { display: none; }
.editor-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 190;
}

.editor-wrapper.fullscreen {
    position: fixed;
    inset: 2rem;
    z-index: 200;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.editor-wrapper.fullscreen .ql-toolbar.ql-snow { flex-shrink: 0; }
.editor-wrapper.fullscreen #quill-editor.ql-container {
    flex: 1;
    min-height: 0;
}
.editor-wrapper.fullscreen .ql-editor {
    min-height: 0;
    height: 100%;
}

/* Infobord weekgrid (/infobord) - one day per row, screen-wide */
.infobord-week {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.infobord-day h2 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}
/* Eigen titel op het bord per dag: hooguit 60 tekens, dus geen schermbreed veld. */
.infobord-day-title { max-width: 32rem; }
.infobord-empty-day { color: var(--muted); font-size: 0.88rem; }
/* The day a dragged row will land in when released over the card itself
   rather than over one of its rows (its heading, or a day with no rows). */
.infobord-day.drop-target { outline: 2px dashed var(--primary); outline-offset: -2px; }
.infobord-table-wrap { overflow-x: auto; margin-bottom: 0.75rem; }
.infobord-table { min-width: 640px; }
.infobord-table input[type=text], .infobord-table input[type=time] {
    width: 100%;
    min-width: 6rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--panel);
    color: var(--text);
}
.infobord-table input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 125, 44, 0.15);
}
.btn.btn-small { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
/* "Opslaan" left, "Alle rijen verwijderen" on the far right: the two are
   opposites, so they should not sit shoulder to shoulder where a hand that
   reaches for save lands on wipe. Wraps to two lines on a phone. */
.infobord-week-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}
.infobord-week-actions form { margin: 0; }
.infobord-week-actions .btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 0.25rem; }

/* Sponsoren/schermen cards below the weekgrid - side by side on desktop, stacked on narrow viewports */
.infobord-bottom-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.infobord-bottom-cards .card {
    flex: 1 1 320px;
}

/* Crop modal (Cropper.js) shown after picking a file in an image upload field */
.crop-modal { display: none; }
.crop-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 210;
    padding: 1.5rem;
}
.crop-modal-inner {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    max-width: 720px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.crop-modal-image-wrap {
    max-height: 60vh;
    overflow: hidden;
    background: #111;
    border-radius: var(--radius-md);
}
.crop-modal-image-wrap img { display: block; max-width: 100%; }
.crop-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Team poules modal (Sportlink admin page) - one per team, same visual language as the crop
   modal above. The sidebar's version popup and the screen-agent popup on /screens share these
   rules by naming themselves in each selector rather than restating them: this is the app's
   generic modal shape, the class name is just older than its later uses. Each keeps a class of
   its own instead of reusing .poule-modal because the poule script on /sportlink binds to every
   .poule-modal on the page, and a modal living in base.html.twig is on that page too - two
   scripts toggling one element. */
.poule-modal, .version-modal, .agent-modal { display: none; }
.poule-modal.open, .version-modal.open, .agent-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 210;
    padding: 1.5rem;
}
.poule-modal-inner, .version-modal-inner, .agent-modal-inner {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    max-width: 480px;
    width: 100%;
    /* Matches .poule-modal.open's own 1.5rem padding on each side, so the
       modal never grows taller than the viewport - a team with many poules
       scrolls its own body instead of pushing the header/close button and
       "Sluiten" button off-screen. */
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.poule-modal-header, .version-modal-header, .agent-modal-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.poule-modal-header h3, .version-modal-header h3, .agent-modal-header h3 { margin: 0; font-size: 1rem; }
.poule-modal-body, .version-modal-body, .agent-modal-body { overflow-y: auto; }
.poule-modal-actions, .version-modal-actions, .agent-modal-actions { display: flex; justify-content: flex-end; flex-shrink: 0; }
/* .poule-modal-close itself is only the shared JS click-to-close hook, used
   by both this icon button and the plain "Sluiten" button below - it must
   stay unstyled so it doesn't affect the text button's sizing too. */
.poule-modal-close-x, .version-modal-close-x, .agent-modal-close-x {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--primary);
}
.poule-modal-close-x:hover, .version-modal-close-x:hover, .agent-modal-close-x:hover { color: var(--primary-dark); background: var(--hover-bg); }
.poule-modal-close-x svg, .version-modal-close-x svg, .agent-modal-close-x svg { width: 20px; height: 20px; }

/* Screen agent popup (/screens). Frame comes from the shared rules above; only the
   contents below are its own. The inner box is wider than the 480px default because the
   install instructions carry a command line that should not wrap into soup. */
.agent-modal-inner { max-width: 620px; }
.agent-modal-body h4 { margin: 1.25rem 0 0.5rem; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--muted); }
.agent-modal-body h4:first-child { margin-top: 0; }
/* Two columns rather than a table: this is a handful of labelled facts, and a table would
   inherit the admin table styling meant for lists of rows. */
.agent-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; }
.agent-facts dt { color: var(--muted); }
.agent-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.agent-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
/* Long enough to wrap: an install line with a full path and a filename does not fit on one
   line on a phone, and a horizontal scrollbar inside a popup is worse than two lines. */
.agent-command { display: block; background: var(--bg); border: 1px solid var(--border);
    padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.8rem; word-break: break-all; }

/* Warning triangle next to a slide's title when its Sportlink team/poule
   went stale (didn't come back in the last good sync) - amber, not the
   --danger red, since this is a "go check it" nudge, not an error state. */
.stale-warning { display: inline-flex; vertical-align: middle; color: #b1481f; margin-left: 0.3rem; }
.stale-warning svg { width: 16px; height: 16px; }

/* Shared tooltip bubble (see the [data-tooltip] script in base.html.twig).
   Fixed rather than absolute, and a direct child of <body>, because .card is
   overflow-x: auto - which clips both axes - so a bubble drawn inside a table
   would be cut off at the card's edges. z-index sits above the modals (210)
   since a tooltip is always the frontmost thing while it is up.
   pointer-events: none is load-bearing: the bubble is positioned right next
   to its trigger, so if it could take a hover or a tap of its own it would
   steal the pointerleave that closes it and flicker. */
#tooltip {
    position: fixed;
    z-index: 220;
    max-width: 22rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    background: #1a1f24;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.35;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    /* An external label or a Sportlink poule name can be long; wrap rather
       than run past the viewport, and break a single absurd word too. */
    overflow-wrap: anywhere;
}
#tooltip[hidden] { display: none; }

/* Mouse cue that there is more to read here. The script also makes these
   focusable, so they show a focus ring like any other interactive element. */
[data-tooltip] { cursor: help; }

/* Version popup contents. The frame itself comes from the shared .poule-modal
   rules above; only the text inside needs its own sizing. */
.version-number { margin: 0; font-size: 1.5rem; font-weight: 600; }
.version-released { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.9rem; }
.version-blurb { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.version-modal-actions { gap: 0.5rem; }

/* ---- Hulppagina ---------------------------------------------------------- */

/* The named version of the inline "color: var(--muted); font-size: 0.9rem"
   intro line other listings use. Only the help page uses the class so far;
   the rest were left alone rather than swept. */
.page-intro { color: var(--muted); font-size: 0.9rem; max-width: 65ch; }

.help-toc h2, .help-section h2 { margin-top: 0; font-size: 1.15rem; }
.help-toc ul { margin: 0; padding-left: 1.1rem; columns: 2; column-gap: 2rem; }
.help-toc li { margin-bottom: 0.3rem; break-inside: avoid; }

/* Prose, so it gets a reading measure and a little more line height than the
   dense table pages this stylesheet was otherwise written for. */
.help-section p, .help-section li { max-width: 70ch; line-height: 1.55; }
.help-section h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.help-section ul { padding-left: 1.1rem; }
.help-section li { margin-bottom: 0.35rem; }

/* The one sentence that explains the rest, and the asides. Marked with a bar in
   the club's own colour rather than a box, so they read as emphasis instead of
   as a warning. */
.help-key, .help-note {
    border-left: 3px solid var(--primary);
    padding: 0.1rem 0 0.1rem 0.75rem;
    margin: 1rem 0;
}
.help-note {
    border-left-color: var(--border);
    color: var(--muted);
    font-size: 0.92rem;
}

.help-step { margin-top: 1.5rem; }
.help-step:first-of-type { margin-top: 1rem; }
.help-step h3 { display: flex; align-items: center; gap: 0.6rem; margin-top: 0; }
.help-step-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
}

/* Screenshots are wider than the reading measure above, so they set their own
   max-width. The border keeps a screenshot of a white page from bleeding into
   the white card around it. */
.help-figure { margin: 0.75rem 0 0; max-width: 100%; }
.help-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.help-figure figcaption {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.help-types li { margin-bottom: 0.5rem; }
.help-contact { background: var(--hover-bg); }

/* Two columns of link text get cramped on a phone; same 768px breakpoint the
   sidebar already switches at. */
@media (max-width: 768px) {
    .help-toc ul { columns: 1; }
}
