/* ═══════════════════════════════════════════════════════════════
   Bagels & Beans — Bestelapp
   Huisstijl gebaseerd op bagelsbeans.nl
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS variabelen ── */
:root {
    --bb-bruin:        #422918;
    --bb-crème:        #FFFAEA;
    --bb-beige:        #ECD5AB;
    --bb-beige-licht:  #FCF4E1;
    --bb-groen:        #55601C;
    --bb-groen-licht:  #AFB376;
    --bb-terracotta:   #A64E17;
    --bb-terracotta-hover: #7d3b11;
    --bb-tekst:        #422918;
    --bb-tekst-zacht:  #7a5c47;
    --bb-border:       #D0C6B4;

    --bb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --bb-radius: 8px;
    --bb-radius-pill: 30px;
}

html, body {
    font-family: var(--bb-font);
    background-color: var(--bb-crème);
    color: var(--bb-tekst);
    margin: 0;
    padding: 0;
}

a, .btn-link {
    color: var(--bb-terracotta);
}

.btn-primary {
    color: var(--bb-crème);
    background-color: var(--bb-terracotta);
    border-color: var(--bb-terracotta);
    border-radius: var(--bb-radius-pill);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--bb-groen-licht);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Reconnect modal (Blazor Server) ───────────────────────────── */

#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow: hidden;
    background-color: rgba(61, 44, 26, 0.6);
    backdrop-filter: blur(2px);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reconnect-dialog {
    background: #FFFAEA;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(61, 44, 26, 0.3);
    padding: 2rem 2.5rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    font-family: var(--bb-font);
}

.reconnect-dialog h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3D2C1A;
    margin: 0 0 0.75rem;
}

.reconnect-dialog p {
    font-size: 0.9rem;
    color: #7a5c47;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.reconnect-dialog .loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.reconnect-dialog .loading-dots span {
    width: 8px;
    height: 8px;
    background: #A64E17;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
}

.reconnect-dialog .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.reconnect-dialog .loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1;   }
}

.reconnect-dialog button {
    display: inline-block;
    padding: 0.55rem 1.5rem;
    background: #A64E17;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: var(--bb-font);
}

.reconnect-dialog button:hover {
    background: #7d3b11;
}

/* ── Bestel tabel — gelijke kolommen ───────────────────────────── */

.bestel-tabel {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.bestel-tabel th:first-child,
.bestel-tabel td:first-child {
    width: 46%;
    text-align: left;
}

.bestel-tabel th:not(:first-child),
.bestel-tabel td:not(:first-child) {
    width: 13.5%;
    text-align: center;
}

/* ── Omzet grafiek ─────────────────────────────────────────────── */

.omzet-grafiek {
    padding: 0.5rem 0;
}

.omzet-rij {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.omzet-dag {
    width: 82px;
    font-size: 0.8rem;
    color: var(--bb-tekst-zacht);
    flex-shrink: 0;
}

.omzet-dag-vandaag {
    font-weight: 700;
    color: var(--bb-tekst);
}

.omzet-balk-wrapper {
    flex: 1;
    background: var(--bb-beige);
    border-radius: 6px;
    height: 20px;
    overflow: hidden;
}

.omzet-balk {
    height: 100%;
    background: var(--bb-groen-licht);
    border-radius: 6px;
    transition: width 0.4s ease;
    min-width: 4px;
}

.omzet-balk-vandaag {
    background: var(--bb-groen);
}

.omzet-bedrag {
    width: 76px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bb-tekst);
    flex-shrink: 0;
}

/* ── Topnavigatie balk ─────────────────────────────────────────── */

.bb-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #3D2C1A;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.bb-topnav-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1.25rem;
    gap: 0.25rem;
}

/* ── Logo ──────────────────────────────────────────────────────── */

.bb-topnav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none !important;
    flex-shrink: 0;
    margin-right: 1rem;
}

.bb-topnav-logo-img {
    height: 32px;
    width: auto;
}

.bb-topnav-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(236, 213, 171, 0.5);
    white-space: nowrap;
}

/* ── Nav links ─────────────────────────────────────────────────── */

.bb-topnav-links {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
}

.bb-topnav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    color: #ECD5AB !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
    line-height: 1;
    font-family: inherit;
}

.bb-topnav-link .bi {
    font-size: 1rem;
    color: #C4986A;
    flex-shrink: 0;
}

.bb-topnav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.bb-topnav-link:hover .bi {
    color: #E8B882;
}

.bb-topnav-link.active {
    background-color: rgba(166, 78, 23, 0.3);
    color: #fff !important;
    font-weight: 600;
}

.bb-topnav-link.active .bi {
    color: #E8B882;
}

/* ── Dropdown ──────────────────────────────────────────────────── */

.bb-dropdown {
    position: relative;
}

.bb-dropdown-toggle {
    font-family: inherit;
}

.bb-dropdown-chevron {
    font-size: 0.7rem !important;
    color: #A07850 !important;
    transition: transform 0.2s;
    margin-left: 0.1rem;
}

.bb-dropdown.open .bb-dropdown-chevron {
    transform: rotate(180deg);
}

.bb-dropdown.open > .bb-dropdown-toggle {
    background-color: rgba(166, 78, 23, 0.3);
    color: #fff !important;
}

.bb-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid #ddd0c0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(61, 44, 26, 0.18);
    padding: 0.4rem 0;
    z-index: 300;
}

.bb-dropdown.open .bb-dropdown-menu {
    display: block;
}

.bb-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    color: #3D2C1A !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.1s;
    cursor: pointer;
}

.bb-dropdown-item:hover {
    background-color: #FEF5E4;
    color: #A64E17 !important;
}

.bb-dropdown-item .bi {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: #A64E17;
    flex-shrink: 0;
}

.bb-dropdown-divider {
    height: 1px;
    background-color: #EAE0D0;
    margin: 0.35rem 0;
}

/* ── Rechts: vestiging badge ───────────────────────────────────── */

.bb-topnav-rechts {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    flex-shrink: 0;
}

.bb-zoek-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bb-zoek-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #C4986A;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.bb-zoek-btn:hover,
.bb-zoek-btn.actief {
    background: rgba(166, 78, 23, 0.4);
    color: #F0D9B5;
}

.bb-zoek-input {
    width: 220px;
    padding: 0.42rem 0.85rem;
    border: 1px solid rgba(236, 213, 171, 0.35);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #F0D9B5;
    font-size: 0.875rem;
    outline: none;
    margin-right: 0.4rem;
    transition: border-color 0.15s, background 0.15s;
}

.bb-zoek-input::placeholder {
    color: rgba(196, 152, 106, 0.6);
}

.bb-zoek-input:focus {
    border-color: rgba(196, 152, 106, 0.7);
    background: rgba(255, 255, 255, 0.15);
}

.bb-zoek-resultaten {
    position: absolute;
    top: calc(100% + 8px);
    right: 40px;
    width: 320px;
    background: #fff;
    border: 1px solid #ddd0c0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(61, 44, 26, 0.18);
    padding: 0.3rem 0;
    z-index: 300;
    max-height: 360px;
    overflow-y: auto;
}

.bb-zoek-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: none;
    border-bottom: 1px solid #F0E8DA;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.1s;
}

.bb-zoek-item:last-child { border-bottom: none; }
.bb-zoek-item:hover { background-color: #FEF5E4; }
.bb-zoek-naam { font-weight: 600; font-size: 0.875rem; color: #3D2C1A; }
.bb-zoek-cat { font-size: 0.75rem; color: #A64E17; white-space: nowrap; flex-shrink: 0; }
.bb-zoek-leeg { padding: 0.85rem 1rem; font-size: 0.875rem; color: #999; font-style: italic; }

/* ── Vestiging badge ───────────────────────────────────────────── */

.bb-vestiging-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(196, 152, 106, 0.25);
    border-radius: 20px;
    color: #D4B896;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    cursor: default;
}

.bb-vestiging-badge .bi-geo-alt-fill { font-size: 0.8rem; flex-shrink: 0; color: #A64E17; }
.bb-vestiging-badge .bi-geo-alt { font-size: 0.8rem; flex-shrink: 0; color: #C4986A; }

.bb-vestiging-naam {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ECD5AB;
    font-weight: 600;
    font-size: 0.82rem;
}

.bb-vestiging-select {
    background: transparent;
    border: none;
    color: #ECD5AB;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    max-width: 200px;
}

.bb-vestiging-select option {
    background: #3D2C1A;
    color: #ECD5AB;
}

/* ── Recept modal overlay ──────────────────────────────────────── */

.bb-recept-overlay {
    position: fixed;
    inset: 0;
    background: rgba(61, 44, 26, 0.55);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.bb-recept-modal {
    background: #FFFAEA;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(61, 44, 26, 0.3);
    width: 100%;
    max-width: 580px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.bb-recept-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ECD5AB;
}

.bb-recept-titel { font-size: 1.3rem; font-weight: 700; color: #3D2C1A; margin: 0 0 0.3rem; }

.bb-recept-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: #A64E17;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.bb-recept-sluiten {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(61, 44, 26, 0.08);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    color: #3D2C1A;
    flex-shrink: 0;
    transition: background 0.15s;
}

.bb-recept-sluiten:hover { background: rgba(166, 78, 23, 0.15); color: #A64E17; }

.bb-recept-sectie-titel {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #55601C;
    margin: 0 0 0.65rem;
}

.bb-recept-bereiding {
    background: #FCF4E1;
    border-left: 3px solid #A64E17;
    border-radius: 0 6px 6px 0;
    padding: 0.9rem 1rem 0.5rem;
    margin-bottom: 1.25rem;
    color: #3D2C1A;
}

.bb-recept-stappen { margin: 0; padding: 0 0 0 1.25rem; display: flex; flex-direction: column; gap: 0; }
.bb-recept-stappen li { font-size: 1rem; line-height: 1.5; padding: 0.55rem 0; border-bottom: 1px solid rgba(166, 78, 23, 0.15); color: #3D2C1A; }
.bb-recept-stappen li:last-child { border-bottom: none; }
.bb-recept-stappen li::marker { font-weight: 700; color: #A64E17; font-size: 0.95rem; }
.bb-recept-ingredienten { margin-bottom: 0.5rem; }
.bb-recept-lijst { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.bb-recept-lijst li { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid #ECD5AB; font-size: 0.875rem; }
.bb-recept-lijst li:last-child { border-bottom: none; }
.bb-recept-hoeveelheid { font-weight: 700; color: #A64E17; min-width: 80px; text-align: right; flex-shrink: 0; font-size: 0.82rem; }
.bb-recept-ing-naam { color: #3D2C1A; }

/* ── Pagina-shells (max-breedte + centrering) ─────────────────── */

.instellingen-shell,
.app-shell {
    max-width: 900px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   CHALLENGE BALK — globaal zodat ChallengeBalk component
   geen eigen .razor.css nodig heeft
   ═══════════════════════════════════════════════════════════════ */

.challenge-balk {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bb-bruin);
    color: #fff;
    z-index: 190; /* onder topnav (200), boven content */
    cursor: pointer;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}

.challenge-balk-collapsed {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    min-height: 52px;
    max-width: 900px;   /* uitlijnen met app-shell */
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.challenge-balk-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.challenge-trophy {
    color: #f0c040;
    font-size: 1.1rem;
}

.challenge-naam {
    font-weight: 700;
    font-size: 0.95rem;
}

.challenge-teller {
    font-size: 0.85rem;
    opacity: 0.75;
}

.challenge-progressbar-wrap {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    overflow: hidden;
    min-width: 80px;
}

.challenge-progressbar-inner {
    height: 100%;
    background: linear-gradient(90deg, #55601C, #A6C030);
    border-radius: 5px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.challenge-balk-rechts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.challenge-pct {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 36px;
    text-align: right;
}

.challenge-chevron {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Uitgeklapte details */
.challenge-details {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 16px 20px 20px;
    cursor: default;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

.challenge-detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
}

.challenge-detail-blok {
    min-width: 180px;
    flex: 1;
}

.challenge-detail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin-bottom: 3px;
}

.challenge-detail-waarde {
    font-size: 0.88rem;
    line-height: 1.4;
}

/* Handmatig turven */
.challenge-turven {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.challenge-turven-label {
    font-size: 0.88rem;
    opacity: 0.85;
}

.challenge-turven-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.challenge-turven-btn:hover:not(:disabled) { background: rgba(255,255,255,0.25); }
.challenge-turven-btn:disabled { opacity: 0.35; cursor: default; }

.challenge-turven-aantal {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.challenge-turven-opslaan {
    padding: 0.38rem 1rem;
    background: var(--bb-terracotta);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.challenge-turven-opslaan:hover { background: var(--bb-terracotta-hover); }

.challenge-melding {
    margin-top: 8px;
    font-size: 0.88rem;
    color: #A6C030;
    font-weight: 600;
}

/* ── Challenges beheer pagina ───────────────────────────────────── */

.bb-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--bb-bruin);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bb-page-title .bi {
    color: var(--bb-terracotta);
}

.challenges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
    flex-wrap: wrap;
    gap: 12px;
}

/* Formulierkaart */
.challenge-form-card {
    background: #fff;
    border: 1.5px solid var(--bb-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.challenge-form-titel {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bb-bruin);
    margin: 0 0 1.25rem;
}

.challenge-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.challenge-form-rij {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.challenge-form-rij label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bb-tekst-zacht);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.challenge-form-rij--full {
    grid-column: 1 / -1;
}

.bb-input {
    border: 1.5px solid var(--bb-border);
    border-radius: 7px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    background: var(--bb-crème);
    color: var(--bb-bruin);
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.bb-input:focus {
    outline: none;
    border-color: var(--bb-terracotta);
    background: #fff;
}

textarea.bb-input { resize: vertical; }

/* Artikelen */
.challenge-artikelen { display: flex; flex-direction: column; gap: 8px; }

.challenge-artikel-rij {
    display: flex;
    gap: 8px;
    align-items: center;
}

.challenge-artikel-input { flex: 1; }

.challenge-artikel-verwijder {
    padding: 0.4rem 0.6rem;
    background: #fff0f0;
    border: 1px solid #f0b8b8;
    border-radius: 6px;
    color: #c0392b;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.challenge-artikel-verwijder:hover { background: #fde0e0; }

.challenge-artikel-hint {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}

.challenge-artikel-toevoeg-btn {
    align-self: flex-start;
    padding: 0.35rem 0.85rem;
    background: var(--bb-beige-licht);
    border: 1px solid var(--bb-border);
    border-radius: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--bb-bruin);
    cursor: pointer;
    font-family: inherit;
}

.challenge-artikel-toevoeg-btn:hover { background: var(--bb-beige); }

.challenge-fout {
    color: #c0392b;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.challenge-form-acties {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.challenge-opslaan-btn {
    padding: 0.5rem 1.25rem;
    background: var(--bb-terracotta);
    color: #fff;
    border: none;
    border-radius: var(--bb-radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.challenge-opslaan-btn:hover { background: var(--bb-terracotta-hover); }

.challenge-annuleer-btn {
    padding: 0.5rem 1.1rem;
    background: #fff;
    color: #666;
    border: 1px solid var(--bb-border);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.challenge-annuleer-btn:hover { background: var(--bb-beige-licht); }

/* Kaarten overzicht */
.challenge-leeg {
    text-align: center;
    color: #aaa;
    padding: 3rem 0;
    font-size: 0.9rem;
    font-style: italic;
}

.challenge-kaart {
    background: #fff;
    border: 1.5px solid var(--bb-border);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.challenge-kaart.actief {
    border-color: var(--bb-groen);
    border-left: 4px solid var(--bb-groen);
}

.challenge-kaart.inactief { opacity: 0.7; }

.challenge-kaart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.challenge-kaart-naam {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bb-bruin);
    margin-right: 6px;
}

.challenge-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: 4px;
}

.challenge-badge.actief { background: var(--bb-groen); color: #fff; }
.challenge-badge.afgelopen { background: #999; color: #fff; }
.challenge-badge.gepland { background: var(--bb-terracotta); color: #fff; }

.challenge-type-badge { font-size: 0.78rem; color: #888; }

.challenge-kaart-acties { display: flex; gap: 6px; flex-shrink: 0; }

.challenge-kaart-btn {
    padding: 0.3rem 0.6rem;
    background: var(--bb-beige-licht);
    border: 1px solid var(--bb-border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--bb-bruin);
    cursor: pointer;
}

.challenge-kaart-btn:hover { background: var(--bb-beige); }

.challenge-kaart-btn-danger { background: #fff0f0; border-color: #f0b8b8; color: #c0392b; }
.challenge-kaart-btn-danger:hover { background: #fde0e0; }

.challenge-kaart-periode { font-size: 0.8rem; color: #999; margin-bottom: 6px; }

.challenge-kaart-beschrijving { font-size: 0.88rem; color: var(--bb-bruin); margin-bottom: 10px; }

.challenge-kaart-progressbar-wrap {
    height: 8px;
    background: var(--bb-beige);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.challenge-kaart-progressbar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--bb-groen), #A6C030);
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.challenge-kaart-score { font-size: 0.8rem; color: #888; margin-bottom: 4px; }

.challenge-kaart-artikelen { font-size: 0.76rem; color: #aaa; font-style: italic; }

/* Ruimte onderaan zodat content niet achter de challenge balk valt */
.bb-main {
    padding-bottom: 60px;
}

/* Behaald badge in de ingeklapte balk */
.challenge-behaald-badge {
    font-size: 0.78rem;
    font-weight: 700;
    background: #f0c040;
    color: #3D2C1A;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* Progressbar kleur als doel behaald */
.challenge-progressbar-behaald {
    background: linear-gradient(90deg, #f0c040, #f5d060) !important;
}

/* Confetti sectie in uitgeklapte balk */
.challenge-confetti-sectie {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.challenge-confetti-btn {
    padding: 0.45rem 1.25rem;
    background: #f0c040;
    color: #3D2C1A;
    border: none;
    border-radius: var(--bb-radius-pill);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s, background 0.15s;
    flex-shrink: 0;
}

.challenge-confetti-btn:hover {
    background: #f5d060;
    transform: scale(1.05);
}

.challenge-confetti-btn:active {
    transform: scale(0.97);
}

.challenge-behaald-tekst {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f0c040;
}

@media (max-width: 600px) {
    .challenge-form-grid { grid-template-columns: 1fr; }
    .challenge-balk-collapsed { padding: 10px 12px; gap: 8px; }
}
