:root {
    --primary: #1e293b;
    --success: #22c55e;
    --danger: #ef4444;
    --background: #f8fafc;
    --text: #0f172a;
}
body { font-family: Arial, sans-serif; margin: 0; padding: 0; background: var(--background); color: var(--text); -webkit-user-select: none; user-select: none; }
.btn { padding: 15px 20px; font-size: 18px; font-weight: bold; border-radius: 8px; border: 1px solid #cbd5e1; cursor: pointer; transition: background 0.2s; }
.btn-success { background: var(--success); color: white; border: none; }

/* RIESIGE TOUCH-OPTIMIERTE TISCHE FÜR TABLETS & HANDYS */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; padding: 20px; }
.table-btn { padding: 40px 10px; font-size: 22px; font-weight: bold; color: white; border: none; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-align: center; }
.table-free { background: var(--success) !important; }
.table-occupied { background: var(--danger) !important; animation: pulse 2s infinite; }

/* BESTELL-LAYOUT */
.order-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; height: calc(100vh - 70px); }
.menu-pane { padding: 15px; overflow-y: auto; background: #f1f5f9; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.product-btn { background: white; padding: 20px 10px; font-size: 16px; text-align: center; border-radius: 8px; border: 1px solid #e2e8f0; display: flex; flex-direction: column; justify-content: space-between; align-items: center; min-height: 80px; }
.product-price { color: #64748b; font-size: 14px; margin-top: 5px; font-weight: bold; }

/* WARENKORB & AKTIONEN */
.cart-pane { background: white; padding: 15px; display: flex; flex-direction:column; justify-content: space-between; border-left: 1px solid #e2e8f0; }
.order-list { overflow-y: auto; flex-grow: 1; border: 1px solid #f1f5f9; border-radius: 6px; padding: 10px; margin-bottom: 10px; }
.order-item { display: flex; justify-content: space-between; padding: 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; font-size: 16px; }
.order-item.selected { background: #bae6fd !important; border-left: 5px solid #0284c7; }
.action-buttons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ADMIN-BEREICH */
.admin-layout { background: white; min-height: 100vh; }
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #e2e8f0; font-size: 16px; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* MOBILE FIX: Handy-Layout einspaltig */
@media (max-width: 700px) {
    body {
        overflow-x: hidden;
    }

    .header {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .header > div {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .order-layout {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: calc(100vh - 120px) !important;
    }

    .menu-pane {
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .cart-pane {
        width: 100% !important;
        border-left: none !important;
        border-top: 2px solid #e2e8f0 !important;
        box-sizing: border-box !important;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .main-categories {
        flex-direction: column !important;
    }

    .main-cat-btn {
        width: 100% !important;
    }

    .product-btn {
        min-height: 70px !important;
        font-size: 15px !important;
        padding: 14px 8px !important;
    }

    .table-btn {
        padding: 28px 8px !important;
        font-size: 20px !important;
    }

    .tables-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 12px !important;
    }

    .action-buttons-grid {
        grid-template-columns: 1fr !important;
    }

    #screen-order > div:first-child {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }
}

