:root {
    --primary: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --bg: #f8fafc;
}

body { font-family: 'Inter', sans-serif; margin: 0; background: var(--bg); overflow: auto; user-select: none; }

.app-grid { display: grid; grid-template-columns: 100px 1fr 380px; height: 100vh; }

/* Sidebar - Optimiert für Touchscreen */
.sidebar-nav { background: var(--dark); color: white; display: flex; flex-direction: column; align-items: center; padding: 15px 0; gap: 12px; }
.nav-item { background: transparent; border: none; color: #94a3b8; padding: 14px; border-radius: 12px; cursor: pointer; font-size: 0.75rem; min-height: 60px; display: flex; flex-direction: column; justify-content: center; transition: 0.2s; touch-action: manipulation; }
.nav-item.active { background: var(--primary); color: white; }
.spacer { flex-grow: 1; }

/* Main Section - Optimiert für Touchscreen */
.pos-main { padding: 18px; overflow-y: auto; background: #f1f5f9; }
.search-bar { display: flex; gap: 12px; margin-bottom: 18px; }
.search-bar input { flex-grow: 1; padding: 16px; border-radius: 12px; border: 1px solid #e2e8f0; font-size: 1rem; min-height: 50px; }
.btn-display-open { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 0 16px; cursor: pointer; min-height: 50px; min-width: 50px; }

/* Product Grid - Touch-friendly */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
.product-card { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); cursor: pointer; transition: 0.15s; border: 2px solid transparent; min-height: 200px; }
.product-card:active { transform: scale(0.95); border-color: var(--primary); }
.card-img { width: 100%; height: 110px; object-fit: cover; }
.card-body { padding: 15px; text-align: center; }

/* Cart - Touch-optimiert */
.cart-sidebar { background: white; padding: 18px; display: flex; flex-direction: column; border-left: 1px solid #e2e8f0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-header h2 { margin: 0; font-size: 1.3rem; }
.btn-manual-add { background: var(--primary); color: white; border: none; padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: bold; min-height: 44px; font-size: 0.95rem; }
.cart-items-flow { flex-grow: 1; overflow-y: auto; }
.grand-total { font-size: 3.2rem; font-weight: 900; text-align: center; padding: 15px 0; color: var(--dark); }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 8px; color: #64748b; font-size: 0.95rem; }

/* Payment Buttons - Touch-friendly */
.pay-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-big-pay { height: 90px; border: none; border-radius: 16px; color: white; font-weight: 900; font-size: 1rem; cursor: pointer; transition: 0.15s; }
.btn-big-pay:active { transform: scale(0.97); }
.btn-big-pay.cash { background: var(--success); }
.btn-big-pay.card { background: var(--primary); }

/* Numpad - Touch-optimiert */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.numpad-card { background: white; width: 90%; max-width: 480px; padding: 20px; border-radius: 24px; }
.modal-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close-icon { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #64748b; }
.numpad-display { background: #f1f5f9; padding: 24px; border-radius: 16px; text-align: center; margin-bottom: 18px; }
#numpad-input-field { font-size: 3.5rem; font-weight: 900; }
.change-info { font-size: 0.95rem; color: var(--success); font-weight: 600; margin-top: 8px; }
.numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.numpad-grid button { height: 70px; border: 1px solid #e2e8f0; background: white; border-radius: 12px; font-size: 1.8rem; font-weight: bold; cursor: pointer; transition: 0.15s; }
.numpad-grid button:active { transform: scale(0.95); background: #f1f5f9; }
.numpad-footer { display: flex; gap: 12px; margin-top: 18px; }
.numpad-footer button { flex: 1; padding: 16px; border-radius: 12px; border: none; font-weight: bold; font-size: 1rem; cursor: pointer; transition: 0.15s; min-height: 50px; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

/* Admin - Umgebaut für bessere Touch-UX */
.admin-dashboard { max-width: 1200px; width: 90%; height: 90vh; }
.admin-body { display: grid; grid-template-columns: 320px 1fr; gap: 24px; padding: 20px; height: 100%; overflow: hidden; }
.admin-form { display: flex; flex-direction: column; gap: 12px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-group { display: flex; flex-direction: column; }
.input-group label { font-size: 0.85rem; margin-bottom: 6px; color: #64748b; font-weight: 600; }
.input-group input { padding: 12px; border-radius: 10px; border: 1px solid #cbd5e1; font-size: 1rem; min-height: 44px; }
.btn-save, .btn-cancel { padding: 14px; border-radius: 10px; border: none; font-weight: bold; font-size: 0.95rem; cursor: pointer; min-height: 46px; transition: 0.15s; }
.btn-save { background: var(--success); color: white; }
.btn-cancel { background: #94a3b8; color: white; }
.btn-save:active, .btn-cancel:active { transform: scale(0.97); }
.admin-table h3 { margin-top: 0; font-size: 1.1rem; }
.admin-scroll-list { height: 100%; overflow-y: auto; }
.admin-item { display: flex; justify-content: space-between; align-items: center; padding: 14px; background: #f8fafc; border-radius: 10px; margin-bottom: 10px; cursor: pointer; transition: 0.15s; }
.admin-item:active { background: #e2e8f0; }
.admin-item button { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1.3rem; padding: 4px; }

.hidden { display: none !important; }

/* ... Rest wie vorher ... */

.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.btn-manual-add { background: #64748b; color: white; border: none; padding: 8px 15px; border-radius: 10px; cursor: pointer; font-weight: bold; }

.cart-entry { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; gap: 10px; }
.qty-controls { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.btn-qty { background: #e2e8f0; border: none; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-weight: bold; font-size: 1rem; color: #0f172a; transition: 0.15s; }
.btn-qty:active { background: #cbd5e1; transform: scale(0.95); }
.qty-display { font-weight: 600; min-width: 35px; text-align: center; color: #64748b; }
.btn-del { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1.2rem; padding: 4px; }

.old-p { text-decoration: line-through; color: #94a3b8; font-size: 0.9em; margin-right: 5px; }
.sale-p { color: #ef4444; }

.numpad-footer button { border: none; padding: 20px; border-radius: 15px; color: white; font-weight: bold; font-size: 1rem; cursor: pointer; }