/* ==========================================================================
   Modernes & Korrigiertes Interface-Design (Struktur wieder wie am Anfang)
   ========================================================================== */

:root {
    --speiseplan-bg-color: #f9f8f3;             /* Helles Clean-Beige */
    --speiseplan-card-bg: #ffffff;              /* Weiße Eingabe-Boxen */
    --speiseplan-text-color: #2b2d42;           /* Weiches Anthrazit */
    --speiseplan-accent-color: #2c4c38;         /* Edles Waldgrün für Orte */
    --speiseplan-accent-hover: #1e3527;
    --wurst-color: #bc5a2b;                     /* Rostorange für Wurst */
    --speiseplan-border-color: #edf2f4;         /* Dezente Trennlinien */
    --speiseplan-border-radius: 10px;           /* Weiche Ecken */
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--speiseplan-bg-color);
    color: var(--speiseplan-text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Haupt-Layout: Sidebar links, Inhalt rechts */
.speiseplan-interface-container {
    display: flex;
    gap: 30px;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Linke Seite: Buttons untereinander */
.speiseplan-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 260px;
}

/* Rechte Seite: Formular-Box */
.speiseplan-content-area {
    flex: 2.5;
    background-color: var(--speiseplan-card-bg);
    padding: 35px;
    border-radius: var(--speiseplan-border-radius);
    box-shadow: 0 10px 30px rgba(141, 153, 174, 0.06);
    border: 1px solid rgba(237, 242, 244, 0.7);
}

/* ==========================================================================
   Buttons & Tabs
   ========================================================================== */
.speiseplan-nav-btn {
    background-color: #f0ede4;
    color: var(--speiseplan-text-color);
    border: none;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--speiseplan-border-radius);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.speiseplan-nav-btn:hover {
    background-color: #e5e1d5;
    transform: translateX(3px);
}

/* Aktiver Zustand für Orte (Grün) */
.speiseplan-nav-btn.active {
    background-color: var(--speiseplan-accent-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(44, 76, 56, 0.15);
}

/* Sonderfarbe für den Wurst-Button im aktiven Zustand */
.speiseplan-nav-btn.active[onclick*="wurstangebote"] {
    background-color: var(--wurst-color) !important;
    box-shadow: 0 4px 12px rgba(188, 90, 43, 0.15);
}

/* ==========================================================================
   Formular-Elemente & Zweispaltiges Grid
   ========================================================================== */

/* Obere Zeile: Datum / Zeitraum über die volle Breite */
.speiseplan-datum-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--speiseplan-border-color);
    border-radius: 8px;
    margin-bottom: 25px;
    background-color: #fafbfc;
    outline: none;
    transition: border-color 0.2s;
}

.speiseplan-datum-input:focus {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

/* DAS ZWEISPALTIGE RASTER (Zusammenhang wiederhergestellt) */
.speiseplan-grid-row {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    align-items: center;
    width: 100%;
}

/* Links: Name des Gerichts (Breit) */
.speiseplan-input-gericht {
    flex: 3;
    padding: 12px 14px;
    border: 1px solid var(--speiseplan-border-color);
    border-radius: 6px;
    font-size: 15px;
    background-color: #ffffff;
}

/* Rechts daneben: Der Preis (Schmaler) */
.speiseplan-input-preis {
    flex: 1;
    min-width: 100px;
    padding: 12px 14px;
    border: 1px solid var(--speiseplan-border-color);
    border-radius: 6px;
    font-size: 15px;
    background-color: #ffffff;
}

/* Fokus-Zustand für Zeilen-Inputs */
.speiseplan-input-gericht:focus,
.speiseplan-input-preis:focus {
    border-color: #cbd5e1;
    outline: none;
}

/* Ganz rechts außen: Löschen-Button (X) */
.btn-row-remove {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 11px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-row-remove:hover {
    background-color: #991b1b;
    color: #ffffff;
    border-color: #991b1b;
}

/* ==========================================================================
   Aktions-Buttons unten
   ========================================================================== */

/* + Feld hinzufügen Button */
.btn-row-add {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.2s;
}

.btn-row-add:hover {
    background-color: #065f46;
    color: #ffffff;
    border-color: #065f46;
}

/* Änderungen live speichern Button */
.btn-submit-save {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background-color: var(--speiseplan-accent-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(44, 76, 56, 0.1);
}

/* Wenn Wurstangebote aktiv sind, passen wir den Speicher-Button per JS/Klasse an oder lassen ihn im edlen Grün */
.btn-submit-save:hover {
    background-color: var(--speiseplan-accent-hover);
    box-shadow: 0 6px 20px rgba(44, 76, 56, 0.2);
}

/* Status-Meldungen */
#speiseplan-status-message {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 15px;
}
.status-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Responsive Anpassung für Smartphones (Falls du mal von unterwegs reinschaust) */
@media (max-width: 768px) {
    .speiseplan-interface-container {
        flex-direction: column;
    }
    .speiseplan-sidebar {
        width: 100%;
    }
}