/* Grundläggande */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f4f6f8; margin: 0; padding-bottom: 90px; color: #333; }
h1 { text-align: center; margin: 20px 0; color: #2c3e50; }
h3 { margin-top: 0; }

/* Vyer */
.view { display: none; padding: 10px 15px 0; max-width: 600px; margin: 0 auto; }
.view.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Cards */
.card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 15px; }
.center-content { text-align: center; }

/* Inputs & Buttons */
input { width: 100%; padding: 12px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; }
.btn { width: 100%; padding: 12px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; margin-bottom: 10px; color: white; font-size: 1rem; }
.btn-primary { background: #007bff; }
.btn-secondary { background: #6c757d; }
.btn-success { background: #28a745; }
.btn-danger { background: #dc3545; }
.btn-purple { background: #6f42c1; }
.btn-orange { background: #fd7e14; }
.btn-disabled { background: #ccc; cursor: not-allowed; }
.small-btn { padding: 5px 10px; border-radius: 4px; border: 1px solid #ccc; background: white; cursor: pointer; }

/* Bild-grid */
.image-grid { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; min-height: 10px; }
.book-thumb { height: 70px; border-radius: 4px; border: 1px solid #ddd; }

/* Boklista */
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.book-item { display: flex; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; margin-bottom: 10px; }
.book-details { flex: 1; font-size: 0.9rem; }
.book-card { display: flex; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; margin-bottom: 10px; align-items: flex-start; }
.book-info { flex: 1; font-size: 0.9rem; }
.book-title { font-weight: 600; margin-bottom: 4px; }
.book-meta { font-size: 0.8rem; color: #666; }
.badge { display: inline-block; padding: 2px 6px; border-radius: 999px; font-size: 0.7rem; margin-left: 6px; }
.badge-success { background: #d4edda; color: #155724; }

/* Navigation */
.nav { position: fixed; bottom: 0; left: 0; width: 100%; background: white; display: flex; border-top: 1px solid #ddd; z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { flex: 1; padding: 15px; background: none; border: none; font-size: 1rem; color: #888; }
.nav-btn.active { color: #007bff; font-weight: bold; border-top: 3px solid #007bff; }

/* Utility */
.hidden { display: none !important; }
.error-text { color: red; font-size: 0.9rem; }
.info-text { color: #666; font-size: 0.85rem; margin-bottom: 15px; }
body.mode-login .nav { display: none; }

/* Slots styling */
.slot { margin-bottom: 15px; }
.slot-header { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 5px; }
.slot-content { 
    background: #f8f9fa; border: 2px dashed #ccc; border-radius: 8px; 
    height: 120px; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; overflow: hidden; position: relative;
}
.slot-content:active { background: #e9ecef; }
.placeholder { color: #888; font-size: 0.9rem; pointer-events: none; }
.preview-img { width: 100%; height: 100%; object-fit: contain; }
.status-icon { font-size: 1.2rem; }
.slot.disabled { opacity: 0.5; pointer-events: none; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.scan-mode-option {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.scan-mode-option:hover, .scan-mode-option:active {
    border-color: #667eea;
    background: #f8f9ff;
    transform: scale(1.02);
}
.offer {
    font-weight: bold;
}
footer{
    text-align: center;
}
#techstack{
    font-size: 0.8rem;
}

