body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: #f4f8fb;
    color: #2b2b2b;
}

.account-balk {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.5rem;
    background: #2b5f8f;
    color: white;
    font-size: 0.9rem;
}

.account-balk a,
.account-balk .link-knop {
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.account-balk a:hover,
.account-balk .link-knop:hover {
    text-decoration: underline;
}

.pagina {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

h1 {
    color: #2b5f8f;
}

.zoekbalk {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.filter-balk {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: -1rem 0 1.5rem 0;
}

.filter-balk select,
.zoekbalk-klein {
    padding: 0.5rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.link-knop-filter {
    background: none;
    border: none;
    color: #2b5f8f;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.recepten-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.recept-kaart {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recept-kaart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recept-kaart img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.recept-kaart .geen-foto {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: #e3edf6;
}

.recept-info {
    padding: 0.75rem 1rem;
}

.recept-info h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.05rem;
}

.tag {
    display: inline-block;
    background: #e3edf6;
    color: #2b5f8f;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.35rem;
}

.terug-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #2b5f8f;
    text-decoration: none;
}

.terug-link:hover {
    text-decoration: underline;
}

.pagina-actiebalk {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.print-knop {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.print-knop:hover {
    background: #e3edf6;
    color: #2b5f8f;
}

.print-knop.actief {
    background: #2b5f8f;
    color: white;
    border-color: #2b5f8f;
}

.actiebalk-rechts {
    display: flex;
    gap: 0.6rem;
}

/* Kookboek-knop op de receptkaarten (Home.razor) */

.kookboek-knop {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #2b5f8f;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.kookboek-knop:hover {
    background: white;
}

.kookboek-knop.actief {
    background: #2b5f8f;
    color: white;
}

.recept-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.recept-hero {
    width: 320px;
    max-width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.beschrijving {
    font-size: 1.05rem;
    color: #555;
}

.metadata {
    margin-top: 0.5rem;
}

.eigenaar-tag {
    color: #888;
    font-size: 0.55em;
    font-weight: 400;
    margin-left: 0.4rem;
}

.kopieer-knop {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #2b5f8f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.kopieer-knop:disabled {
    opacity: 0.6;
    cursor: default;
}

.kopieer-knop:hover:not(:disabled) {
    background: #1e4665;
}

.login-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.foutmelding {
    color: #b32121;
    font-size: 0.9rem;
}

.uitgebreide-beschrijving {
    white-space: pre-line;
    margin-bottom: 1.5rem;
}

.recept-inhoud {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 2rem;
}

.recept-inhoud h2 {
    color: #2b5f8f;
    border-bottom: 2px solid #e3edf6;
    padding-bottom: 0.25rem;
}

.ingredienten ul {
    list-style: none;
    padding: 0;
}

.ingredienten li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #f2f2f2;
}

.ingredienten .hoeveelheid {
    display: inline-block;
    min-width: 6rem;
    font-weight: 600;
    color: #2b5f8f;
}

.ingredienten .note {
    color: #888;
    font-size: 0.9rem;
}

.bereiding ol {
    padding-left: 1.2rem;
}

.bereiding li {
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.stap-tijd {
    color: #888;
    font-size: 0.9rem;
}

.tips {
    margin-top: 2rem;
}

@media (max-width: 700px) {
    .recept-inhoud {
        grid-template-columns: 1fr;
    }
}

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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCB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2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* Bereken-balk (tijd/kcal) en hoofdbestanddelen */

.bereken-balk {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.hoofdbestanddelen {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
}

/* Eigenaar-acties op de detailpagina */

.eigenaar-acties {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.favoriet-knop {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #b3891f;
}

.favoriet-knop:hover {
    background: #fdf6e3;
}

a.kopieer-knop {
    display: inline-block;
    text-decoration: none;
}

.verwijder-recept-knop {
    padding: 0.5rem 1rem;
    background: white;
    color: #b32121;
    border: 1px solid #b32121;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.verwijder-recept-knop:hover:not(:disabled) {
    background: #fdecec;
}

.bevestig-verwijderen {
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bevestig-verwijderen .link-knop {
    background: none;
    border: none;
    color: #2b5f8f;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

/* Recepteditor */

.bewerk-sectie {
    background: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.bewerk-sectie h2 {
    margin-top: 0;
    color: #2b5f8f;
}

.tekst-invoer {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font: inherit;
}

.klein-invoer {
    width: 6rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font: inherit;
}

.veld-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.veld-grid select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.veld-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.snel-toevoeg-knop {
    align-self: flex-start;
    background: none;
    border: none;
    color: #2b5f8f;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
}

.snel-toevoeg-veld {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.snel-toevoeg-veld .tekst-invoer {
    width: auto;
    flex: 1 1 8rem;
}

.snel-toevoeg-veld .link-knop {
    background: none;
    border: none;
    color: #2b5f8f;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    padding: 0;
    white-space: nowrap;
}

.snel-toevoeg-veld .link-knop:disabled {
    opacity: 0.6;
    cursor: default;
}

.foutmelding-klein {
    color: #b32121;
    font-size: 0.8rem;
}

.onderdeel-blok {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.onderdeel-kop {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.onderdeel-kop .tekst-invoer {
    flex: 1;
    font-weight: 600;
}

.regel-tabel {
    width: 100%;
    border-collapse: collapse;
}

.regel-tabel td {
    padding: 0.25rem;
    vertical-align: middle;
}

.regel-tabel select {
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.stap-regel {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.stap-regel .tekst-invoer {
    flex: 1;
}

.stap-regel label {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

.stap-nummer {
    font-weight: 600;
    color: #2b5f8f;
    padding-top: 0.5rem;
}

.toevoeg-knop {
    background: #e3edf6;
    color: #2b5f8f;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.toevoeg-knop:hover {
    background: #d3e4f0;
}

.verwijder-knop {
    background: none;
    border: none;
    color: #b32121;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
}

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

.opslaan-balk {
    position: sticky;
    bottom: 0;
    background: #f4f8fb;
    padding: 1rem 0;
}

/* Foto-uploader (recepten/ingrediënten/gereedschap) */

.foto-uploader {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
}

.foto-uploader .foto-preview {
    max-width: 260px;
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.foto-uploader .geen-foto-klein {
    width: 260px;
    height: 150px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3edf6;
    border-radius: 8px;
    color: #999;
    font-size: 0.85rem;
}

.foto-uploader-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-top: 0.25rem;
}

.foto-uploader .upload-status {
    font-size: 0.85rem;
    color: #666;
}

/* Zoekbare ingrediënt-/hoofdbestanddeel-kiezer */

.zoeker {
    position: relative;
}

.zoeker-cel {
    min-width: 220px;
}

.zoek-regel {
    align-items: flex-start;
}

.zoek-resultaten {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 2px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: absolute;
    z-index: 5;
    width: max-content;
    min-width: 100%;
    max-width: 320px;
}

.zoek-resultaten button {
    text-align: left;
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.zoek-resultaten button:hover {
    background: #e3edf6;
}

.geen-resultaten {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.geen-resultaten a {
    color: #2b5f8f;
}

.sectie-hint {
    font-size: 0.8rem;
    color: #888;
    font-weight: normal;
}

/* Stamtabellen / ingrediënten / gereedschap beheer */

.stamtabel-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.stamtabel-link {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: #2b5f8f;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.stamtabel-link:hover {
    background: #e3edf6;
}

.stamtabel-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: start;
}

.stamtabel-lijst,
.stamtabel-form {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.stamtabel-items {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
}

.stamtabel-items li {
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}

.stamtabel-items li:hover {
    background: #e3edf6;
}

.stamtabel-items li.actief {
    background: #2b5f8f;
    color: white;
}

@media (max-width: 700px) {
    .stamtabel-body {
        grid-template-columns: 1fr;
    }
}

.beheer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.beheer-lijst-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.beheer-lijst-item.actief {
    outline: 2px solid #2b5f8f;
}

.beheer-lijst-item button {
    background: none;
    border: none;
    color: #2b5f8f;
    cursor: pointer;
    font-weight: 600;
}

/* Printen van een los recept — laat alleen de recept-inhoud over, geen navigatie/knoppen. */

@page {
    size: A4;
    margin: 2cm 1.5cm;
}

@media print {
    .account-balk,
    .pagina-actiebalk,
    .eigenaar-acties,
    .login-hint,
    .foutmelding,
    .print-knop,
    #blazor-error-ui {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .pagina {
        max-width: 100%;
        padding: 0;
    }

    .recept-hero {
        max-width: 250px;
        max-height: 200px;
    }

    .tag {
        background: none;
        border: 1px solid #999;
        color: black;
    }

    .recept-inhoud {
        grid-template-columns: 1fr 1.6fr;
        gap: 1.5rem;
    }

    .ingredienten li,
    .bereiding li {
        break-inside: avoid;
    }

    section {
        break-inside: avoid-page;
    }

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

    .kookboek-recept {
        break-before: page;
    }

    .kookboek-keuken-kop {
        break-before: page;
    }

    .inhoudsopgave {
        break-after: page;
    }
}

/* Kookboek: inhoudsopgave + doorlopende receptenweergave (scherm) */

.inhoudsopgave {
    background: white;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.inhoudsopgave h3 {
    color: #2b5f8f;
    margin-top: 1.25rem;
}

.inhoudsopgave h4 {
    margin: 0.5rem 0 0.25rem 1rem;
    font-size: 0.95rem;
    color: #666;
}

.inhoudsopgave ul {
    margin: 0.25rem 0 0.25rem 1rem;
}

.inhoudsopgave a {
    color: #2b2b2b;
    text-decoration: none;
}

.inhoudsopgave a:hover {
    color: #2b5f8f;
    text-decoration: underline;
}

.kookboek-keuken-kop {
    color: #2b5f8f;
    border-bottom: 2px solid #e3edf6;
    padding-bottom: 0.4rem;
    margin-top: 2.5rem;
}

.kookboek-recept {
    background: white;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.beheer-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 0.5rem;
}

/* Kookboek */

.kookboek-lijst {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.kookboek-lijst li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.kookboek-lijst a {
    color: #2b2b2b;
    text-decoration: none;
}

.kookboek-lijst a:hover {
    color: #2b5f8f;
    text-decoration: underline;
}
