* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f0eb;
    color: #333;
    min-height: 100vh;
}

header {
    background: #5a7247;
    color: white;
    padding: 1rem;
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.header-logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.header-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1rem;
}

.header-link:active {
    color: white;
}

.header-logout {
    margin-left: auto;
    font-size: 0.85rem;
    opacity: 0.6;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Navigation */
.week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
}

.week-label {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.week-label small {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
}

.nav-arrow {
    color: #5a7247;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #ddd;
}

.nav-arrow:active {
    background: #eee;
}

/* Tageskarten */
.plan-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.day-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #5a7247;
}

.day-card.today {
    border-left-color: #d4a017;
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.25);
}

.day-card.empty {
    border-left-color: #ccc;
    opacity: 0.7;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.day-card.today .day-header {
    background: #fdf6e3;
}

.day-name {
    font-weight: 600;
    font-size: 1rem;
}

.day-date {
    color: #888;
    font-size: 0.85rem;
}

.day-body {
    padding: 0.75rem 1rem;
}

.meal-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.meal-name a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px dashed #999;
}

.meal-name a:active {
    color: #5a7247;
}

.veggie-alt {
    font-size: 0.9rem;
    color: #5a7247;
    margin-bottom: 0.3rem;
}

.veggie-badge {
    font-size: 0.85rem;
    color: #5a7247;
}

.dessert {
    font-size: 0.9rem;
    color: #8b6914;
    margin-top: 0.3rem;
}

.dessert a {
    color: #8b6914;
    text-decoration: none;
    border-bottom: 1px dashed #c9a84c;
}

.notes {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.3rem;
}

.no-meal {
    color: #aaa;
    font-style: italic;
    font-size: 0.95rem;
}

/* Zurück-Link */
.back-link {
    display: inline-block;
    color: #5a7247;
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Rezeptdetail */
.recipe-detail h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.meta-tag {
    background: #eee;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.meta-tag.veggie {
    background: #e8f5e9;
    color: #5a7247;
}

.recipe-section {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.recipe-section h3 {
    font-size: 1rem;
    color: #5a7247;
    margin-bottom: 0.5rem;
}

.recipe-section p {
    line-height: 1.6;
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredients-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
}

.recipe-notes {
    color: #666;
    font-style: italic;
}

/* Rezeptsuche */
.search-form {
    margin-bottom: 1.5rem;
}

.search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    -webkit-appearance: none;
}

.search-input:focus {
    outline: none;
    border-color: #5a7247;
}

.search-button {
    padding: 0.6rem 1.2rem;
    background: #5a7247;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    -webkit-appearance: none;
}

.filter-checkbox {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reset-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
}

.recipe-count {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recipe-card {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.recipe-card:active {
    background: #f9f9f9;
}

.recipe-card-name {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.recipe-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.recipe-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* Einkaufsliste */
.shopping-period {
    color: #666;
    margin-bottom: 1rem;
}

.shopping-section {
    background: white;
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shopping-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shopping-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.shopping-list li:last-child {
    border-bottom: none;
}

.ingredient-name {
    font-weight: 500;
}

.ingredient-recipes {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
    margin-left: 1rem;
}

.shopping-hint {
    background: #fff8e1;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.shopping-hint h3 {
    font-size: 0.95rem;
    color: #a46a1f;
    margin-bottom: 0.4rem;
}

.shopping-hint p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

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

.shopping-hint li {
    font-size: 0.9rem;
    padding: 0.2rem 0;
    color: #555;
}

/* Druckansicht */
@media print {
    header, .header-nav, .shopping-period {
        display: none;
    }

    .shopping-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .shopping-list li {
        padding: 0.3rem 0.5rem;
    }
}

/* Login */
.login-container {
    max-width: 320px;
    margin: 3rem auto;
    text-align: center;
}

.login-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.login-error {
    background: #fce9ed;
    color: #83122a;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0.75rem;
    -webkit-appearance: none;
}

.login-input:focus {
    outline: none;
    border-color: #5a7247;
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background: #5a7247;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
}

/* Leerer Zustand */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
    font-size: 1.1rem;
}

/* iPad-Optimierung */
@media (min-width: 768px) {
    main {
        padding: 1.5rem 2rem;
    }

    .week-label {
        font-size: 1.5rem;
    }

    .day-body {
        padding: 1rem 1.25rem;
    }

    .meal-name {
        font-size: 1.2rem;
    }
}
