/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Lato:wght@300;400;700&display=swap');

/* ===== Lavendel-Farbpalette ===== */
:root {
    --lavender-light:   #f7f3fd;
    --lavender-soft:    #e8dcf8;
    --lavender-mid:     #c3a8e8;
    --lavender-main:    #9b6fd4;
    --lavender-dark:    #6d3fa8;
    --lavender-deep:    #4a2875;
    --rose-soft:        #fce8f0;
    --rose-main:        #d4728f;
    --green-herb:       #5a8a5e;
    --green-light:      #e8f3e9;
    --gold:             #c9a84c;
    --white:            #ffffff;
    --grey-light:       #faf8fe;
    --grey-border:      #ddd0f0;
    --text-dark:        #3a2555;
    --text-mid:         #6b4f8a;
    --shadow:           rgba(109, 63, 168, 0.12);
    --shadow-hover:     rgba(109, 63, 168, 0.22);
}

/* ===== Reset & Basis ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Lato', sans-serif;
    background: var(--lavender-light);
    background-image:
        radial-gradient(ellipse at 10% 20%, rgba(196,168,232,0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(212,114,143,0.12) 0%, transparent 50%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Hintergrund: kalte Platte – ganzes Bild, kräftig sichtbar */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../data/images/hintergrund_platte.jpg') center center / contain no-repeat;
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
}

a { color: var(--lavender-dark); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--lavender-deep); }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Dekorative Blüten (CSS-Ornamente) ===== */
.floral-divider {
    text-align: center;
    color: var(--lavender-mid);
    font-size: 1.2rem;
    letter-spacing: 8px;
    margin: 1.5rem 0;
    opacity: 0.7;
}
.floral-divider::before { content: '❀ ✿ ❀'; }

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, var(--lavender-deep) 0%, var(--lavender-dark) 50%, var(--rose-main) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 3px 15px var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Blumen-Hintergrund im Header */
.site-header::before {
    content: '🌸 🌿 🌺 🌼 🍃 🌸 🌿 🌺 🌼 🍃 🌸 🌿 🌺 🌼 🍃 🌸 🌿 🌺 🌼 🍃';
    position: absolute;
    top: 0; left: 0; right: 0;
    font-size: 0.75rem;
    opacity: 0.15;
    letter-spacing: 6px;
    white-space: nowrap;
    overflow: hidden;
    padding: 4px 0;
    line-height: 1;
}
.site-header::after {
    content: '🌿 🌼 🍃 🌺 🌸 🌿 🌼 🍃 🌺 🌸 🌿 🌼 🍃 🌺 🌸 🌿 🌼 🍃 🌺 🌸';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    font-size: 0.75rem;
    opacity: 0.15;
    letter-spacing: 6px;
    white-space: nowrap;
    overflow: hidden;
    padding: 4px 0;
    line-height: 1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.2rem 1.5rem;
    max-width: 1150px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.site-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: var(--white);
    letter-spacing: 1px;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.site-logo span { font-style: normal; opacity: 0.85; font-size: 1.4rem; margin-right: 0.3rem; }

.main-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.3px;
}
.main-nav a:hover { background: rgba(255,255,255,0.2); text-decoration: none; border-color: rgba(255,255,255,0.5); }
.main-nav .nav-admin { background: rgba(255,255,255,0.15); }
.main-nav .nav-logout { color: rgba(255,255,255,0.65); font-size: 0.85rem; border-color: transparent; }

/* ===== Main ===== */
main.container { padding-top: 2.5rem; padding-bottom: 4rem; flex: 1; }

/* ===== Footer ===== */
.site-footer {
    background: var(--lavender-deep);
    color: rgba(255,255,255,0.75);
    text-align: center;
    padding: 1.2rem;
    font-size: 0.9rem;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.5px;
    margin-top: auto;
}
.site-footer::before {
    content: '✿ ❀ ✿';
    display: block;
    font-size: 0.9rem;
    opacity: 0.4;
    margin-bottom: 0.3rem;
    letter-spacing: 8px;
}

/* ===== Seiten-Titel ===== */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: var(--lavender-deep);
    margin-bottom: 0.3rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--lavender-soft);
    position: relative;
}
.page-title::after {
    content: ' ✿';
    color: var(--rose-main);
    font-style: normal;
    font-size: 1.4rem;
}

/* ===== Login-Seite ===== */
.login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
}

.login-box {
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 35px var(--shadow);
    text-align: center;
    position: relative;
}

.login-box::before {
    content: '🌸 🌿 🌸';
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    letter-spacing: 6px;
}

.login-box h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-style: italic;
    color: var(--lavender-deep);
    margin-bottom: 0.3rem;
}

.login-box .subtitle {
    color: var(--lavender-mid);
    margin-bottom: 2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* ===== Formulare ===== */
.form-group { margin-bottom: 1.3rem; text-align: left; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-mid);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1.1rem;
    border: 1.5px solid var(--grey-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    background: var(--grey-light);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--lavender-main);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(155, 111, 212, 0.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lavender-dark), var(--lavender-main));
    color: var(--white);
    box-shadow: 0 3px 12px rgba(109, 63, 168, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--lavender-deep), var(--lavender-dark));
    box-shadow: 0 5px 18px rgba(109, 63, 168, 0.4);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--white);
}

.btn-secondary {
    background: var(--lavender-soft);
    color: var(--lavender-deep);
    border: 1px solid var(--grey-border);
}
.btn-secondary:hover {
    background: var(--lavender-mid);
    color: var(--white);
    text-decoration: none;
}

.btn-danger {
    background: #c0392b;
    color: var(--white);
}
.btn-danger:hover { background: #962d22; text-decoration: none; color: var(--white); }

.btn-herb {
    background: linear-gradient(135deg, var(--green-herb), #3d6b41);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(90, 138, 94, 0.3);
}
.btn-herb:hover { background: linear-gradient(135deg, #3d6b41, #2d4f30); color: var(--white); text-decoration: none; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; border-radius: 15px; }

/* ===== Meldungen ===== */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}
.alert-error   { background: #fde8e8; border-left: 4px solid #c0392b; color: #7b1f1f; }
.alert-success { background: #e8f8e8; border-left: 4px solid #27ae60; color: #1a5e2a; }

/* ===== Kategorie-Filter (alt, nicht mehr genutzt) ===== */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

/* ===== Koch-Auswahl (freie Kreise, kein Kasten) ===== */
.chef-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 2.6rem;
    margin: 1rem auto 3rem auto;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

/* Grosser Kopf einer ausgewählten Person */
.chef-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    text-align: center;
}
.chef-header-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--white);
    box-shadow: 0 6px 24px var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    background: var(--lavender-soft);
}
.chef-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.chef-header-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: var(--lavender-deep);
    margin: 0;
}

.chef-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease;
    width: 140px;
}
.chef-card:hover { transform: translateY(-4px) scale(1.03); text-decoration: none; }

.chef-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    border: 5px solid var(--white);
    box-shadow: 0 4px 16px var(--shadow);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    background: var(--lavender-soft);
}
.chef-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.chef-avatar-all  { background: linear-gradient(135deg, var(--lavender-soft), var(--rose-soft)); }
.chef-card.active .chef-avatar {
    border-color: var(--lavender-main);
    box-shadow: 0 0 0 4px rgba(155,111,212,0.30), 0 4px 14px var(--shadow);
}
.chef-card:hover .chef-avatar {
    box-shadow: 0 0 0 4px rgba(155,111,212,0.18), 0 6px 18px var(--shadow-hover);
}

.chef-name {
    font-size: 1rem;
    text-align: center;
    color: var(--text-mid);
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
    font-family: 'Lato', sans-serif;
    transition: color 0.2s;
}
.chef-card.active .chef-name,
.chef-card:hover  .chef-name { color: var(--lavender-dark); }

.cat-pill {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    background: var(--lavender-light);
    border: 1.5px solid var(--grey-border);
    color: var(--lavender-dark);
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.cat-pill-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    vertical-align: middle;
    margin-right: 0.5rem;
    border: 2px solid var(--grey-border);
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.cat-pill.active .cat-pill-avatar,
.cat-pill:hover .cat-pill-avatar {
    border-color: rgba(255,255,255,0.7);
}

/* Grösserer Pill wenn Person-Foto vorhanden */
.cat-pill.has-person {
    padding: 0.4rem 1.2rem 0.4rem 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
}

.cat-pill:hover,
.cat-pill.active {
    background: linear-gradient(135deg, var(--lavender-dark), var(--lavender-main));
    border-color: var(--lavender-main);
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 2px 8px var(--shadow);
}

/* ===== Rezept-Karten ===== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.6rem;
}

.recipe-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--grey-border);
    box-shadow: 0 3px 14px var(--shadow);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px var(--shadow-hover);
}

.recipe-card-img {
    height: 190px;
    background: linear-gradient(135deg, var(--lavender-soft), var(--rose-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    overflow: hidden;
    position: relative;
}
.recipe-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(255,255,255,0.3));
}
.recipe-card-img img:not(.person-badge) { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.recipe-card-img.cat-marietta { background: linear-gradient(135deg, #fce8f0, #f8d0e4); }
.recipe-card-img.cat-marco    { background: linear-gradient(135deg, #fef0e8, #faddcc); }
.recipe-card-img.cat-frogolina{ background: linear-gradient(135deg, #e8f3e9, #d4ecda); }
.recipe-card-img.cat-buecher  { background: linear-gradient(135deg, #fffbe8, #f7f0cc); }
.recipe-card-img.cat-manuela  { background: linear-gradient(135deg, #ede8fd, #ddd0f8); }
.recipe-card-img.cat-wildkraeuter { background: linear-gradient(135deg, #e8f3e9, #c8e8cb); }
.recipe-card-img.cat-kosmetik { background: linear-gradient(135deg, #fce8f0, #f5d0e4); }

.recipe-card-body { padding: 1.2rem 1.4rem; flex: 1; display: flex; flex-direction: column; }

.recipe-card-cat {
    font-size: 0.72rem;
    color: var(--rose-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.recipe-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--lavender-deep);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.recipe-card-desc {
    font-size: 0.88rem;
    color: #888;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-kcal {
    font-size: 0.8rem;
    color: var(--green-herb);
    font-weight: 700;
    margin-top: 0.5rem;
}

.recipe-card-footer {
    padding: 0.9rem 1.4rem;
    border-top: 1px solid var(--lavender-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background: var(--grey-light);
}

/* ===== Einzelnes Rezept ===== */
.recipe-detail { max-width: 820px; }

.recipe-detail h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: var(--lavender-deep);
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
    font-size: 0.88rem;
    color: var(--lavender-mid);
    align-items: center;
}

.recipe-kcal-badge {
    background: var(--green-light);
    color: var(--green-herb);
    border-radius: 12px;
    padding: 0.25rem 0.8rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.recipe-image {
    display: block;
    max-width: 100%;
    max-height: 460px;
    width: auto;
    margin: 0 auto 1.8rem auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
}

.recipe-emoji-hero {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--lavender-soft), var(--rose-soft));
    border-radius: 16px;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.recipe-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--grey-border);
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
}
.recipe-section::before {
    content: '✿';
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    color: var(--lavender-soft);
    font-size: 1.2rem;
}
.recipe-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--lavender-dark);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--lavender-soft);
}
.recipe-section p, .recipe-section li { line-height: 1.8; font-size: 0.97rem; }
.text-line { line-height: 1.8; font-size: 0.97rem; overflow-wrap: break-word; }
.text-line-empty { height: 0.5rem; line-height: 0.5rem; }
.recipe-section ul { padding-left: 1.4rem; }
.recipe-section li { margin-bottom: 0.3rem; }

.symptom-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.symptom-tag {
    background: var(--green-light);
    color: var(--green-herb);
    border-radius: 14px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(90,138,94,0.2);
    transition: all 0.2s;
}
.symptom-tag:hover { background: var(--green-herb); color: var(--white); text-decoration: none; }

/* ===== Personen & Kalorien Badge ===== */
.recipe-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}
.badge {
    padding: 0.3rem 0.9rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
}
.badge-persons { background: var(--lavender-soft); color: var(--lavender-deep); }
.badge-kcal    { background: var(--green-light);   color: var(--green-herb); }

/* ===== Symptome-Seite ===== */
.symptom-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.symptom-card {
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 12px;
    padding: 1rem 1.3rem;
    text-decoration: none;
    color: var(--lavender-dark);
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
}
.symptom-card:hover, .symptom-card.active {
    background: linear-gradient(135deg, var(--lavender-dark), var(--lavender-main));
    color: var(--white);
    border-color: var(--lavender-main);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--shadow);
}
.symptom-card .count {
    font-size: 0.78rem;
    background: var(--lavender-soft);
    border-radius: 10px;
    padding: 0.15rem 0.55rem;
    color: var(--lavender-dark);
    font-family: 'Lato', sans-serif;
    font-weight: 700;
}
.symptom-card:hover .count, .symptom-card.active .count { background: rgba(255,255,255,0.25); color: var(--white); }

/* ===== Admin ===== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.1rem;
    margin-bottom: 2rem;
}

.admin-card {
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 14px;
    padding: 1.6rem;
    text-align: center;
    text-decoration: none;
    color: var(--lavender-dark);
    transition: all 0.2s;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px var(--shadow);
    font-family: 'Lato', sans-serif;
}
.admin-card:hover {
    background: linear-gradient(135deg, var(--lavender-dark), var(--lavender-main));
    color: var(--white);
    text-decoration: none;
    border-color: var(--lavender-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow-hover);
}
.admin-card .icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px var(--shadow); }
.data-table th { background: linear-gradient(135deg, var(--lavender-dark), var(--lavender-main)); color: var(--white); padding: 0.9rem 1.1rem; text-align: left; font-size: 0.88rem; letter-spacing: 0.5px; text-transform: uppercase; }
.data-table td { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--lavender-light); font-size: 0.95rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--grey-light); }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ===== Leere Zustände ===== */
.empty-state {
    text-align: center;
    padding: 3.5rem;
    color: var(--lavender-mid);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state p { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }

/* ===== Suchfeld ===== */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.search-bar input {
    flex: 1;
    padding: 0.75rem 1.1rem;
    border: 1.5px solid var(--grey-border);
    border-radius: 25px;
    font-size: 1rem;
    background: var(--white);
    color: var(--text-dark);
    box-shadow: 0 2px 8px var(--shadow);
}
.search-bar input:focus { outline: none; border-color: var(--lavender-main); box-shadow: 0 0 0 3px rgba(155,111,212,0.12); }

/* ===== Vegan-Herz-Badge ===== */
.vegan-heart {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.92);
    color: var(--green-herb);
    border-radius: 20px;
    padding: 0.3rem 0.7rem 0.3rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 3;
    letter-spacing: 0.3px;
}
.vegan-heart .heart {
    color: #4caf50;
    font-size: 0.95rem;
    line-height: 1;
}

/* Vegan-Herz gross (Detailseite) */
.vegan-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--green-light);
    color: var(--green-herb);
    border: 1.5px solid rgba(90,138,94,0.3);
    border-radius: 16px;
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
}
.vegan-badge-large .heart { color: #4caf50; font-size: 1.1rem; }

/* ===== Personen-Badge auf Rezeptkarten ===== */
.person-badge {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center top !important;
    border: 3px solid var(--white) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    z-index: 2 !important;
    transition: transform 0.2s;
}
.person-badge:hover { transform: scale(1.12); }

.person-badge-large {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--lavender-soft);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* ===== Admin-Formular ===== */
.form-card {
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 3px 14px var(--shadow);
    margin-bottom: 1.5rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1.2rem 0;
}

.file-input {
    padding: 0.5rem !important;
    cursor: pointer;
    font-size: 0.9rem !important;
}

.image-preview {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: var(--grey-light);
    border-radius: 8px;
    border: 1px solid var(--grey-border);
}

.form-group small {
    font-weight: 300;
    color: var(--lavender-mid);
    text-transform: none;
    font-size: 0.8rem;
    letter-spacing: 0;
}

@media (max-width: 600px) {
    .form-row-2 { grid-template-columns: 1fr; }
}

/* ===== Vorschläge-Seite ===== */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.7rem;
    margin-bottom: 2rem;
}

.ingredient-check {
    position: relative;
}
.ingredient-check input[type=checkbox] { display: none; }
.ingredient-check label {
    display: block;
    padding: 0.7rem 1rem;
    background: var(--white);
    border: 2px solid var(--grey-border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--text-dark);
    font-weight: 400;
}
.ingredient-check input:checked + label {
    background: linear-gradient(135deg, var(--lavender-dark), var(--lavender-main));
    border-color: var(--lavender-main);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 2px 10px var(--shadow);
}
.ingredient-check label:hover { border-color: var(--lavender-main); transform: translateY(-1px); }

.proposal-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid var(--grey-border);
    box-shadow: 0 3px 12px var(--shadow);
    margin-bottom: 1.2rem;
    display: none;
}
.proposal-card.show { display: block; }
.proposal-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--lavender-deep);
    margin-bottom: 0.5rem;
}
.proposal-card .badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.proposal-card p { font-size: 0.93rem; line-height: 1.7; color: #666; }
.herb-tag {
    background: var(--green-light);
    color: var(--green-herb);
    border-radius: 10px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ===== Druckbutton ===== */
.btn-print {
    background: linear-gradient(135deg, #4a6fa5, #2c4a7c);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(44, 74, 124, 0.3);
}
.btn-print:hover {
    background: linear-gradient(135deg, #2c4a7c, #1a2f52);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== Druckansicht ===== */
@page {
    margin: 1.5cm 1.8cm;
}

@media print {
    /* Nicht-druckbare Elemente ausblenden */
    .site-header,
    .site-footer,
    .main-nav,
    .recipe-badges,
    .btn,
    .btn-print,
    .actions,
    a[href^="←"],
    .recipe-detail > p:first-child {
        display: none !important;
    }

    html, body {
        background: #fff !important;
        background-image: none !important;
        font-family: Georgia, 'Times New Roman', serif;
        color: #1a1a1a;
        font-size: 13pt;
        line-height: 1.6;
        margin: 0;
        padding: 0;
    }

    main.container { padding: 0 !important; margin: 0 !important; }

    .recipe-detail {
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Titel */
    .recipe-detail h1 {
        font-size: 26pt;
        font-style: italic;
        color: #4a2875 !important;
        border-bottom: 3px solid #9b6fd4;
        padding-bottom: 8pt;
        margin: 0 0 6pt 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Info-Zeile (Kategorie / Personen / Kalorien) */
    .recipe-print-info {
        display: block !important;
        font-size: 11pt;
        color: #555;
        margin-bottom: 16pt;
    }

    /* Bild – gross genug, füllt aber nicht alles */
    .recipe-image {
        display: block;
        width: 100%;
        max-height: 9cm;
        object-fit: cover;
        border-radius: 6pt;
        margin: 0 0 18pt 0;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .recipe-emoji-hero { display: none; }

    /* Abschnitte – dürfen über Seiten brechen, damit nichts abgeschnitten wird */
    .recipe-section {
        border: none;
        border-top: 1.5pt solid #e0d4f5;
        border-radius: 0;
        padding: 12pt 0 4pt 0;
        margin: 0 0 14pt 0;
        box-shadow: none;
        background: none;
        page-break-inside: auto;
        break-inside: auto;
    }
    .recipe-section::before { display: none; }

    .recipe-section h2 {
        font-size: 16pt;
        color: #4a2875 !important;
        border: none;
        margin-bottom: 8pt;
        padding: 0;
        page-break-after: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .recipe-section p,
    .recipe-section li {
        font-size: 13pt;
        line-height: 1.7;
        color: #1a1a1a;
        orphans: 3;
        widows: 3;
    }

    /* Jede Textzeile bleibt als Ganzes zusammen – wird nie horizontal zerschnitten */
    .text-line {
        font-size: 13pt;
        line-height: 1.75;
        color: #1a1a1a;
        margin: 0;
        padding: 1pt 0;
        overflow-wrap: break-word;
        word-wrap: break-word;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .text-line-empty { height: 6pt; padding: 0; }
    .text-block { break-inside: auto; }

    /* Kopfzeile auf jedem Blatt */
    .recipe-detail::before {
        content: "🌿  Manuelas Rezeptbuch";
        display: block;
        font-size: 11pt;
        font-style: italic;
        color: #9b6fd4;
        margin-bottom: 14pt;
        letter-spacing: 0.5pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Fusszeile */
    .recipe-detail::after {
        content: "✿  Mit Liebe gemacht  ✿";
        display: block;
        text-align: center;
        font-size: 10pt;
        color: #b89ee0;
        margin-top: 24pt;
        padding-top: 10pt;
        border-top: 1pt solid #e0d4f5;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .person-badge-large,
    .vegan-badge-large { display: none; }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .site-logo { font-size: 1.3rem; }
    .page-title { font-size: 1.6rem; }
    .recipe-grid { grid-template-columns: 1fr; }
    .main-nav { gap: 0.4rem; }
    .main-nav a { font-size: 0.82rem; padding: 0.3rem 0.7rem; }
}
