/* PWE Responsive Design CSS – Neumorphism */
/* Mobile-First, Light/Dark via prefers-color-scheme */

/* ========================================
   CSS Custom Properties (Light Mode)
   ======================================== */
:root {
    --bg:           #f0f2f5;
    --bg-surface:   #f0f2f5;
    --bg-input:     #e8ebf0;
    --text:         #2d2d2d;
    --text-muted:   #6b7280;
    --accent:       #2c5aa0;
    --accent-hover: #1e3f73;
    --accent-light: #66b3ff;
    --heading:      #2c5aa0;

    /* Neumorphic shadows */
    --shadow-dark:  #c8ccd4;
    --shadow-light: #ffffff;

    /* Semantic surfaces */
    --card-bg:      #f0f2f5;
    --input-border: transparent;
    --section-bg:   #e4e7ec;
    --checkbox-bg:  #f0f2f5;
    --meal-bg:      #f0f2f5;

    /* Message colors */
    --error-bg:     #fce8e8;
    --error-text:   #742a2a;
    --error-accent: #e53e3e;
    --info-bg:      #e3effc;
    --info-text:    #1e3a8a;
    --info-accent:  #3b82f6;
    --success-bg:   #e2f5e2;
    --success-text: #14532d;
    --success-accent:#22c55e;
    --warn-bg:      #fdf5e0;
    --warn-text:    #92400e;
    --warn-accent:  #f59e0b;

    /* Cost area */
    --cost-bg:      var(--checkbox-bg);
    --cost-border:  #2e9e5a;
    --cost-value:   #15803d;
    --bank-value:   #2c5aa0;
    --pay-note-bg:  #fdf5e0;
    --pay-note-border: #f59e0b;
    --pay-note-text:#b45309;

    /* Debug */
    --debug-bg:     #e4e7ec;
    --debug-border: #d0d5dd;
}

/* ========================================
   Dark Mode Overrides (auto – follows OS)
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:           #1e1e1e;
        --bg-surface:   #252525;
        --bg-input:     #1a1a1a;
        --text:         #e0e0e0;
        --text-muted:   #9e9e9e;
        --accent:       #4a90d9;
        --accent-hover: #6baaf0;
        --accent-light: #87ceeb;
        --heading:      #7ec8e3;

        --shadow-dark:  #111111;
        --shadow-light: #3a3a3a;

        --card-bg:      #252525;
        --input-border: transparent;
        --section-bg:   #2c2c2c;
        --checkbox-bg:  #252525;
        --meal-bg:      #252525;

        --error-bg:     #352020;
        --error-text:   #f8b4b4;
        --error-accent: #e53e3e;
        --info-bg:      #1c2535;
        --info-text:    #93c5fd;
        --info-accent:  #3b82f6;
        --success-bg:   #1c2b1c;
        --success-text: #86efac;
        --success-accent:#22c55e;
        --warn-bg:      #2b2616;
        --warn-text:    #fcd34d;
        --warn-accent:  #f59e0b;

        --cost-bg:      var(--checkbox-bg);
        --cost-border:  #278a4e;
        --cost-value:   #86efac;
        --bank-value:   #7ec8e3;
        --pay-note-bg:  #2b2616;
        --pay-note-border:#f59e0b;
        --pay-note-text:#fcd34d;

        --debug-bg:     #2c2c2c;
        --debug-border: #444444;
    }
}

/* Forced dark (user chose "dark") */
:root[data-theme="dark"] {
    --bg:           #1e1e1e;
    --bg-surface:   #252525;
    --bg-input:     #1a1a1a;
    --text:         #e0e0e0;
    --text-muted:   #9e9e9e;
    --accent:       #4a90d9;
    --accent-hover: #6baaf0;
    --accent-light: #87ceeb;
    --heading:      #7ec8e3;

    --shadow-dark:  #111111;
    --shadow-light: #3a3a3a;

    --card-bg:      #252525;
    --input-border: transparent;
    --section-bg:   #2c2c2c;
    --checkbox-bg:  #252525;
    --meal-bg:      #252525;

    --error-bg:     #352020;
    --error-text:   #f8b4b4;
    --error-accent: #e53e3e;
    --info-bg:      #1c2535;
    --info-text:    #93c5fd;
    --info-accent:  #3b82f6;
    --success-bg:   #1c2b1c;
    --success-text: #86efac;
    --success-accent:#22c55e;
    --warn-bg:      #2b2616;
    --warn-text:    #fcd34d;
    --warn-accent:  #f59e0b;

    --cost-bg:      var(--checkbox-bg);
    --cost-border:  #278a4e;
    --cost-value:   #86efac;
    --bank-value:   #7ec8e3;
    --pay-note-bg:  #2b2616;
    --pay-note-border:#f59e0b;
    --pay-note-text:#fcd34d;

    --debug-bg:     #2c2c2c;
    --debug-border: #444444;
}

/* ========================================
   Theme Toggle Button (single, cycles)
   ======================================== */
.theme-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
}

.theme-toggle button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--text-muted);
    transition: box-shadow 0.2s, transform 0.15s, color 0.2s;
    box-shadow:
        3px 3px 6px var(--shadow-dark),
       -3px -3px 6px var(--shadow-light);
}

.theme-toggle button svg {
    display: block;
}

.theme-toggle button:hover {
    color: var(--accent);
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.theme-toggle button:active {
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
    transform: scale(0.93);
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background: linear-gradient(145deg, #f8f9fc 0%, #ebeef3 40%, #f2f0ed 100%);
    background-attachment: fixed;
    color: var(--text);
}

/* Dark body gradient */
@media (prefers-color-scheme: dark) {
    body:not([data-theme-body="light"]) {
        background: linear-gradient(145deg, #1e1e1e 0%, #1a1a1a 40%, #1c1c1c 100%);
    }
}
:root[data-theme="dark"] ~ body,
html[data-theme="dark"] body {
    background: linear-gradient(145deg, #1e1e1e 0%, #1a1a1a 40%, #1c1c1c 100%);
}
html[data-theme="light"] body {
    background: linear-gradient(145deg, #f8f9fc 0%, #ebeef3 40%, #f2f0ed 100%);
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: var(--bg-surface);
    min-height: 100vh;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.header-image {
    background-image: url(pwe.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    width: 100%;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    padding: 20px 15px;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 1.8rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
    color: var(--heading);
}

h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--heading);
}

/* ========================================
   Form Container – Neumorphic Card
   ======================================== */
.form-container {
    background: var(--card-bg);
    padding: 24px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
       -6px -6px 12px var(--shadow-light);
}

/* ========================================
   Error Markings on Fields
   ======================================== */
.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-accent) !important;
    border-width: 2px !important;
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light),
        0 0 0 1px var(--error-accent) !important;
}

.form-group.error label {
    color: var(--error-accent) !important;
}

.checkbox-group.error,
.radio-group.error {
    box-shadow:
        inset 2px 2px 5px var(--shadow-dark),
        inset -2px -2px 5px var(--shadow-light),
        0 0 0 2px var(--error-accent) !important;
}

.field-error {
    display: block;
    color: var(--error-accent);
    font-size: 0.75rem;
    margin-top: 0.3rem;
    font-weight: 300;
    opacity: 0.85;
    line-height: 1.2;
}

.field-info {
    display: block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ========================================
   Form Layout
   ======================================== */
.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
}

/* ========================================
   Inputs – Inset Neumorphic
   ======================================== */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-family: 'Inter', "Segoe UI", sans-serif;
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text);
    transition: box-shadow 0.25s ease;
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
}

.form-group textarea {
    resize: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light),
        0 0 0 3px rgba(74, 144, 226, 0.25);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ========================================
   Checkbox / Radio Groups – Subtle Raised
   ======================================== */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--checkbox-bg);
    border-radius: 12px;
    border: none;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkbox-item input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 0;
    margin-top: 1px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    background: var(--bg-input);
    position: relative;
    transition: box-shadow 0.2s ease;
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
}

.checkbox-item input[type="checkbox"]:checked {
    background: var(--accent);
    box-shadow:
        3px 3px 6px var(--shadow-dark),
       -3px -3px 6px var(--shadow-light);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.checkbox-item input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light),
        0 0 0 3px rgba(74, 144, 226, 0.3);
}

/* ---- Radio Buttons (neumorphic) ---- */
.radio-item input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 0;
    margin-top: 1px;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    background: var(--bg-input);
    position: relative;
    transition: box-shadow 0.2s ease;
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
}

.radio-item input[type="radio"]:checked {
    background: var(--accent);
    box-shadow:
        3px 3px 6px var(--shadow-dark),
       -3px -3px 6px var(--shadow-light);
}

.radio-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radio-item input[type="radio"]:focus-visible {
    outline: none;
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light),
        0 0 0 3px rgba(74, 144, 226, 0.3);
}

.checkbox-item label,
.radio-item label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    flex: 1;
    color: var(--text);
}

.radio-group.error {
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light),
        0 0 0 2px var(--error);
}

/* ---- Day Toggle (in meal-day h4) ---- */
.day-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    font-weight: bold;
    color: var(--heading);
}

.day-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    background: var(--bg-input);
    position: relative;
    transition: box-shadow 0.2s ease;
    box-shadow:
        inset 1.5px 1.5px 3px var(--shadow-dark),
        inset -1.5px -1.5px 3px var(--shadow-light);
}

.day-toggle input[type="checkbox"]:checked {
    background: var(--accent);
    box-shadow:
        2px 2px 4px var(--shadow-dark),
       -2px -2px 4px var(--shadow-light);
}

.day-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Indeterminate state – some but not all day items checked */
.day-toggle input[type="checkbox"].indeterminate {
    background: var(--accent);
    opacity: 0.55;
    box-shadow:
        2px 2px 4px var(--shadow-dark),
       -2px -2px 4px var(--shadow-light);
}

.day-toggle input[type="checkbox"].indeterminate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 2.5px;
    background: #fff;
    border: none;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.day-toggle span {
    font-weight: bold;
    color: var(--heading);
}

/* ========================================
   Section Panel – Card wrapping header + content
   ======================================== */
.section-panel {
    background: var(--checkbox-bg);
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent);
    overflow: hidden;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

/* ========================================
   Section Headers – top bar inside panel
   ======================================== */
.section-header {
    background: var(--accent);
    padding: 12px 18px;
    margin: 0;
    border-radius: 0;
    border-left: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: none;
}

.section-body {
    padding: 1rem 1.25rem;
}

/* Groups inside panel lose own card styling */
.section-body .checkbox-group,
.section-body .radio-group {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.section-body .checkbox-group.error,
.section-body .radio-group.error {
    background: transparent;
    box-shadow: none;
    padding: 0.6rem;
    border-radius: 8px;
    outline: 2px solid var(--error-accent);
}

/* Textarea inside panel */
.section-body textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-family: 'Inter', "Segoe UI", sans-serif;
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text);
    resize: none;
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transition: box-shadow 0.25s ease;
    margin-bottom: 1rem;
}

.section-body textarea:focus {
    outline: none;
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light),
        0 0 0 3px rgba(74, 144, 226, 0.25);
}

.section-body textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Sub-section header inside panels */
.sub-section-header {
    font-weight: bold;
    font-size: 1rem;
    color: var(--text);
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

/* Cost section panel */
.section-panel.cost-section {
    border-left-color: var(--cost-border);
    background: var(--cost-bg);
}

.section-panel.cost-section > .section-header {
    background: var(--cost-border);
    color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-panel.cost-section > .section-header::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background-color: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ========================================
   Meals Grid
   ======================================== */
.meals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.meal-day {
    background: var(--meal-bg);
    padding: 1rem;
    border-radius: 12px;
    border: none;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.meal-day h4 {
    margin: 0 0 0.75rem 0;
    color: var(--heading);
    font-size: 1rem;
}

.meal-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* ========================================
   Submit Button – Neumorphic Raised
   ======================================== */
.submit-button {
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    box-shadow:
        5px 5px 10px var(--shadow-dark),
       -5px -5px 10px var(--shadow-light);
}

.submit-button:hover {
    background: var(--accent-hover);
    box-shadow:
        6px 6px 14px var(--shadow-dark),
       -6px -6px 14px var(--shadow-light);
}

.submit-button:active {
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transform: translateY(1px);
}

/* ========================================
   Cost Calculation – now inside section-panel
   ======================================== */
.cost-calculation {
    margin: 2rem 0;
    padding: 20px;
    background: var(--cost-bg);
    border: none;
    border-radius: 16px;
    border-left: 4px solid var(--cost-border);
    box-shadow:
        5px 5px 10px var(--shadow-dark),
       -5px -5px 10px var(--shadow-light);
}

/* Payment instructions */
.payment-instructions {
    margin: 1rem 0;
}

/* Payment note – warning icon (yellow) */
.payment-note p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--pay-note-text);
    font-weight: 500;
}

.payment-note p::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    background-color: var(--warn-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
}

.cost-info .betrag {
    color: var(--cost-value);
    font-size: 1.3rem;
    font-weight: bold;
}

.bank-details {
    margin: 1rem 0;
    width: 100%;
}

.bank-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--shadow-dark);
    gap: 1rem;
}

.bank-row:last-child {
    border-bottom: none;
}

.bank-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 100px;
    flex-shrink: 0;
}

.bank-value {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: var(--bank-value);
    text-align: right;
    word-break: break-all;
    flex: 1;
}

.payment-instructions {
    margin: 1rem 0;
}

.payment-note {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--pay-note-bg);
    border-radius: 12px;
    border-left: 4px solid var(--pay-note-border);
    box-shadow:
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
}

.cost-info p {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

/* ========================================
   Message Boxes – Neumorphic Raised
   ======================================== */
.error:not(.form-group):not(.checkbox-group) {
    background: var(--error-bg);
    border: none;
    color: var(--error-text);
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: 500;
    border-left: 4px solid var(--error-accent);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.error:not(.form-group):not(.checkbox-group)::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background-color: var(--error-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
}

.info {
    background: var(--info-bg);
    border: none;
    color: var(--info-text);
    padding: 16px 20px;
    border-radius: 14px;
    margin: 1rem 0;
    font-weight: 500;
    border-left: 4px solid var(--info-accent);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.info::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background-color: var(--info-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center / contain;
}

.success {
    background: var(--success-bg);
    border: none;
    color: var(--success-text);
    padding: 16px 20px;
    border-radius: 14px;
    margin: 1rem 0;
    font-weight: 500;
    border-left: 4px solid var(--success-accent);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.success::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background-color: var(--success-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 11-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 11-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") no-repeat center / contain;
}

.warning {
    background: var(--warn-bg);
    border: none;
    color: var(--warn-text);
    padding: 16px 20px;
    border-radius: 14px;
    margin: 1rem 0;
    font-weight: 500;
    border-left: 4px solid var(--warn-accent);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
       -4px -4px 8px var(--shadow-light);
}

.warning::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background-color: var(--warn-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ========================================
   Debug Sections
   ======================================== */
.debug-section {
    background: var(--debug-bg);
    border-top: 1px solid var(--debug-border);
    padding: 15px;
}

.debug-mails,
.debug-logs {
    max-width: 100%;
    margin: 10px 15px;
    padding: 15px;
    background: var(--debug-bg);
    border: 1px solid var(--debug-border);
    border-radius: 12px;
    overflow-x: auto;
    color: var(--text);
}

/* ========================================
   Links
   ======================================== */
a {
    color: var(--accent);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-light);
}

/* ========================================
   Tables (debug / admin)
   ======================================== */
table {
    background-color: var(--card-bg);
    color: var(--text);
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background-color: var(--section-bg);
    color: var(--text);
    border-color: var(--debug-border);
}

table td {
    border-color: var(--debug-border);
    color: var(--text);
}

pre, code {
    background-color: var(--bg-input);
    color: var(--text);
    border-color: var(--debug-border);
    border-radius: 8px;
}

select {
    background-color: var(--bg-input);
    color: var(--text);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
}

/* ========================================
   Responsive: Mobile – Header & Info-Boxen
   ======================================== */
@media (max-width: 767px) {
    /* Bild auf Mobile ausblenden – spart Platz */
    .header {
        height: auto;
        min-height: 0;
    }

    .header-image {
        display: none;
    }

    /* Info-Boxen: display:block statt flex, damit Leerzeichen erhalten bleibt */
    .info,
    .error,
    .success {
        display: block;
        padding: 12px 16px;
    }

    .info::before,
    .error::before,
    .success::before {
        display: none;
    }

    h1 {
        font-size: 1.5rem;
        margin: 0 0 1rem 0;
    }
}

/* ========================================
   Responsive: Mobile Bank Details
   ======================================== */
@media (max-width: 480px) {
    .bank-row {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

    .bank-label {
        min-width: auto;
        font-size: 0.9rem;
    }

    .bank-value {
        text-align: left;
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .bank-details {
        margin: 0.5rem 0;
    }

    .bank-row {
        padding: 0.4rem 0;
    }

    .bank-label {
        font-size: 0.85rem;
    }

    .bank-value {
        font-size: 0.9rem;
    }

    .payment-note {
        padding: 0.75rem;
        margin-top: 0.75rem;
    }
}

/* ========================================
   Responsive: Tablet (>= 768px)
   ======================================== */
@media (min-width: 768px) {
    .container {
        max-width: 900px;
        margin: 30px auto;
        border-radius: 20px;
        min-height: auto;
        box-shadow:
            10px 10px 20px var(--shadow-dark),
           -10px -10px 20px var(--shadow-light);
    }

    .header {
        height: 210px;
        border-radius: 20px 20px 0 0;
    }

    .header-image {
        display: block;
    }

    .main-content {
        padding: 30px 40px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .form-row.two-column {
        flex-direction: row;
        gap: 1rem;
    }

    .form-row.two-column .form-group {
        flex: 1;
    }

    .meals-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .meal-options {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .submit-button {
        width: auto;
        min-width: 220px;
        display: block;
        margin: 1.5rem auto 0 auto;
    }
}

/* ========================================
   Responsive: Desktop (>= 1024px)
   ======================================== */
@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
    }

    .main-content {
        padding: 40px 50px;
    }

    .meals-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .checkbox-group {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* High-DPI: pwe-2x.jpg verwenden, falls vorhanden */
/*
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .header-image {
        background-image: url(pwe-2x.jpg);
    }
}
*/

/* ========================================
   Print
   ======================================== */
@media print {
    .debug-section,
    .debug-mails,
    .debug-logs {
        display: none;
    }

    .container {
        box-shadow: none;
        max-width: 100%;
        margin: 0;
    }

    .header-image {
        height: 150px;
    }
}

/* ========================================
   Touch Optimisation
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    .checkbox-item input[type="checkbox"] {
        width: 26px;
        height: 26px;
        min-width: 26px;
        border-radius: 8px;
    }

    .checkbox-item input[type="checkbox"]:checked::after {
        width: 7px;
        height: 13px;
    }

    .submit-button {
        padding: 18px 32px;
        font-size: 1.2rem;
    }

    .checkbox-item {
        padding: 8px;
        margin: -8px;
        border-radius: 8px;
    }

    .checkbox-item:active {
        background: rgba(74, 144, 226, 0.12);
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
