/* Base */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f0f2f5; margin: 0; padding: 0; }
button { cursor: pointer; border: none; outline: none; }
.hidden { display: none !important; }

/* Navigation */
nav { background: #2c3e50; color: white; padding: 1rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.brand { font-weight: bold; font-size: 1.2rem; }
.nav-buttons button { background: transparent; color: #bdc3c7; font-weight: bold; margin-left: 10px; padding: 5px 10px; border-radius: 4px; }
.nav-buttons button.active { background: #34495e; color: white; }

/* Inventory View */
.view { padding: 1rem; max-width: 800px; margin: 0 auto; }
.search-container input { width: 100%; padding: 12px; font-size: 16px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 1rem; box-sizing: border-box; }

.card { background: white; padding: 15px; margin-bottom: 10px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
.item-name { font-weight: 600; font-size: 1.1rem; color: #333; }
.item-meta { color: #7f8c8d; font-size: 0.9rem; margin-top: 4px; }
.card-qty { display: flex; align-items: center; gap: 10px; }
.card-qty button { background: #ecf0f1; color: #2c3e50; width: 32px; height: 32px; border-radius: 50%; font-weight: bold; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.card-qty span { font-weight: bold; font-size: 1.1rem; min-width: 20px; text-align: center; }

/* Intake View */
.intake-header label { display: block; font-size: 0.8rem; color: #7f8c8d; margin-bottom: 5px; font-weight: bold; }
.intake-header select { width: 100%; padding: 15px; font-size: 1.2rem; border: 2px solid #3498db; border-radius: 8px; background: white; margin-bottom: 20px; }

.scanner-container input { width: 100%; padding: 20px; font-size: 1.5rem; text-align: center; border: 2px solid #ddd; border-radius: 8px; box-sizing: border-box; }
.scanner-container input:focus { border-color: #27ae60; }

#scan-status { text-align: center; margin-top: 20px; font-size: 1.5rem; font-weight: bold; color: #7f8c8d; }
#scan-status.success { color: #27ae60; }
#scan-status.error { color: #e74c3c; }
#scan-status.processing { color: #f39c12; }

/* Modal */
.modal { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 200; }
.modal-content { background: white; width: 90%; max-width: 400px; padding: 25px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.modal h2 { margin-top: 0; color: #2c3e50; }
.barcode-display { font-family: monospace; background: #eee; padding: 2px 6px; border-radius: 4px; }
.form-group { margin-bottom: 15px; }
.form-group input { width: 100%; padding: 10px; font-size: 1rem; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 6px; font-weight: bold; font-size: 1rem; }
.btn-save { background: #27ae60; color: white; }
.btn-cancel { background: #e74c3c; color: white; }

#offline-badge { position: fixed; bottom: 0; left: 0; right: 0; background: #c0392b; color: white; text-align: center; padding: 8px; font-weight: bold; font-size: 0.9rem; }
