/* Allgemeine Stile */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    text-align: center;
}

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

h1, h2, h3 {
    margin-top: 0;
}

/* Gäste-Ansicht: Speisekarte */
.category {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.menu-item:last-child {
    border-bottom: none;
}

.item-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.item-action {
    display: flex;
    align-items: center;
}

.price {
    font-weight: bold;
    margin-right: 1rem;
}

.add-btn {
    background-color: #3498db;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-btn:hover {
    background-color: #2980b9;
}

/* Gäste-Ansicht: Warenkorb */
#cart {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    border-top: 1px solid #ddd;
}

#cart-items {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

#total-price {
    font-size: 1.2em;
    font-weight: bold;
    text-align: right;
}

#place-order-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1em;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#place-order-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Bar-Ansicht */
.bar-view main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.order-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 5px solid #e67e22; /* Farbe für "neu" */
}

.order-card h3 {
    margin-bottom: 0.5rem;
}

.order-card .timestamp {
    font-size: 0.8em;
    color: #777;
    margin-bottom: 1rem;
}

.order-card ul {
    padding-left: 20px;
}

.complete-btn {
    width: 100%;
    padding: 0.7rem;
    margin-top: 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
}

#paypal-button-container {
    margin-bottom: 1rem;
}

.payment-option-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1em;
    border: 1px solid #3498db;
    background-color: white;
    color: #3498db;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 1rem;
}

#close-modal-btn {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
}


.payment-info {
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.payment-info.cash {
    background-color: #e74c3c; /* Rot */
    color: white;
}
.payment-info.paid {
    background-color: #2ecc71; /* Grün */
    color: white;
}



/* NEU: Stile für die Admin-Ansicht */
.admin-view {
    background-color: #ecf0f1;
}

.admin-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-category {
    margin-bottom: 2rem;
}

.admin-view form {
    display: flex;
    flex-direction: column;
}

.admin-view label {
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    font-weight: bold;
    color: #555;
}

.admin-view input, .admin-view select {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    margin-bottom: 1rem;
}

.admin-view button {
    padding: 0.8rem;
    font-size: 1em;
    color: white;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
}

.admin-view .button-group {
    display: flex;
    gap: 1rem;
}

.admin-view .delete-btn {
    background-color: #e74c3c;
}

.admin-view .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 1rem;
    align-items: flex-end;
}

.admin-view .form-grid .full-width {
    grid-column: 1 / -1;
}

.item-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden; /* Wichtig für die abgerundeten Ecken */
}

.item-table th {
    background-color: #f2f2f2;
    text-align: left;
    padding: 0.8rem;
    color: #555;
    font-size: 0.9em;
}

.item-table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.item-table tbody tr {
    border-bottom: 1px solid #ddd;
}

/* Entfernt die untere Linie bei der Beschreibungszeile, um Artikel abzugrenzen */
.item-table tbody .description-row {
    border-bottom: 2px solid #bdc3c7; /* Starke Trennlinie zwischen Artikeln */
}

.item-table .table-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid transparent; /* Unsichtbarer Rand im Normalzustand */
    border-radius: 4px;
    font-size: 1em;
    background-color: transparent;
    transition: all 0.2s;
}

.item-table .table-input:focus {
    outline: none;
    border-color: #3498db; /* Rand wird beim Bearbeiten sichtbar */
    background-color: #f8f9fa;
}

.item-table .price-col {
    width: 100px;
}
.item-table .price-input {
    text-align: right;
}

.item-table .action-col {
    width: 220px;
    text-align: right;
    vertical-align: middle;
}

.item-table .action-col button {
    margin: 0 0 0 0.5rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.9em;
}
.item-table .save-btn {
    background-color: #27ae60;
}


/* Passe die Breite der Preis-Spalte an */
.item-table .price-col {
    width: 130px; /* Schmaler als zuvor */
}

/* NEU: Stile für den Preis-Wrapper */
.price-wrapper {
    display: flex;
    align-items: center; /* Zentriert das €-Zeichen vertikal */
}

.price-wrapper span {
    font-weight: bold;
    margin-left: 0.5rem; /* Etwas Abstand zum Eingabefeld */
    font-size: 1.1em;
    color: #555;
}


.admin-view .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 1rem;
    align-items: flex-end;
}

.admin-view .form-grid .full-width {
    grid-column: 1 / -1;
}

.item-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.item-table th {
    background-color: #f2f2f2;
    text-align: left;
    padding: 0.8rem;
    color: #555;
    font-size: 0.9em;
}

.item-table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.item-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.item-table tbody .description-row {
    border-bottom: 2px solid #bdc3c7;
}

.item-table .table-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 1em;
    background-color: transparent;
    transition: all 0.2s;
}

.item-table .table-input:focus {
    outline: none;
    border-color: #3498db;
    background-color: #f8f9fa;
}

/* NEU: Angepasste Preis-Spalte */
.item-table .price-col {
    width: 130px; 
}
.item-table .price-input {
    text-align: right;
}

/* NEU: Wrapper für Preis und Euro-Zeichen */
.price-wrapper {
    display: flex;
    align-items: center;
}

.price-wrapper span {
    font-weight: bold;
    margin-left: 0.5rem;
    font-size: 1.1em;
    color: #555;
}


.item-table .action-col {
    width: 220px;
    text-align: right;
    vertical-align: middle;
}

.item-table .action-col button {
    margin: 0 0 0 0.5rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.9em;
}
.item-table .save-btn {
    background-color: #27ae60;
}




/* ========================================= */
/* NEUE STILE FÜR DIE HISTORY-ANSICHT (KARTEN) */
/* ========================================= */

.history-view main {
    max-width: 1200px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.history-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.history-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.history-card h2 {
    margin: 0;
    font-size: 1.5em;
}

.history-card .card-content {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex-grow: 1; /* Wichtig, damit der untere Bereich wächst */
}

.history-card .order-details {
    flex-grow: 1;
}

.history-card .order-details small {
    display: block;
    margin-bottom: 1rem;
    color: #777;
}

.history-card .order-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-card .order-details li {
    padding: 0.2rem 0;
}

.history-card .payment-area {
    margin-top: 1.5rem;
    border-top: 1px dashed #ccc;
    padding-top: 1.5rem;
}

.payment-toggle-btn, .payment-static {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.payment-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.payment-toggle-btn strong, .payment-static strong {
    font-size: 1.1em;
    margin-bottom: 0.25rem;
}

.payment-toggle-btn span, .payment-static span {
    font-size: 0.8em;
    opacity: 0.8;
}

.payment-toggle-btn.status-pending {
    background-color: #27ae60;
    color: white;
}

.payment-toggle-btn.status-completed {
    background-color: #f39c12;
    color: white;
}

.payment-static.status-completed {
    background-color: #ecf0f1;
    color: #2c3e50;
    cursor: default;
}

.status-label {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
}

.status-label.status-neu {
    background-color: #e67e22; /* Orange */
}

.status-label.status-erledigt {
    background-color: #34495e; /* Dunkelgrau */
}
    
/* In der Bar-Ansicht */
.order-card.status-neu { border-left-color: #e67e22; }
.order-card.status-abholbereit { border-left-color: #3498db; }
.order-card .action-btn { width: 100%; padding: 0.8rem; /* ... weitere Stile */ }
.order-card .mark-ready-btn { background-color: #3498db; color: white; border: none; }

/* In der History-Ansicht */
.history-card .card-footer { padding: 0 1.5rem 1.5rem; }
.mark-delivered-btn { 
    width: 100%; 
    background-color: #2ecc71; 
    color: white; 
    padding: 0.8rem; 
    border: none; 
    border-radius: 8px; 
    font-size: 1.1em;
    cursor: pointer;
}

/* Neue Status-Label Farben */
.status-label.status-abholbereit { background-color: #3498db; } /* Blau */
.status-label.status-ausgeliefert { background-color: #95a5a6; } /* Grau */

  

