body { font-family: Arial, sans-serif; background: #f7f7f7; margin: 0; padding: 0; }
.container { max-width: 600px; margin: 40px auto; background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 2px 8px #0001; }
h1 { text-align: center; }
form { display: flex; flex-direction: column; gap: 12px; }
input, button { padding: 8px; font-size: 1rem; }
table { width: 100%; border-collapse: collapse; margin-top: 24px; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background: #f0f0f0; }
.status-scanned { color: green; font-weight: bold; }
.status-unscanned { color: orange; font-weight: bold; }
.btn-download { 
    display: inline-block; 
    background: #4CAF50; 
    color: white; 
    padding: 12px 24px; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: bold; 
    margin-top: 16px;
    transition: background 0.3s;
}
.btn-download:hover { 
    background: #45a049; 
}
.btn-download-small { 
    display: inline-block; 
    background: #2196F3; 
    color: white; 
    padding: 4px 8px; 
    text-decoration: none; 
    border-radius: 4px; 
    font-size: 12px;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-download-small:hover { 
    background: #1976D2; 
}
.btn-whatsapp { 
    display: inline-block; 
    background: #25D366; 
    color: white; 
    padding: 12px 20px; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: bold; 
    margin-top: 16px;
    transition: background 0.3s;
}
.btn-whatsapp:hover { 
    background: #128C7E; 
}
.btn-whatsapp-small { 
    display: inline-block; 
    background: #25D366; 
    color: white; 
    padding: 4px 8px; 
    text-decoration: none; 
    border-radius: 4px; 
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    transition: background 0.3s;
}
.btn-whatsapp-small:hover { 
    background: #128C7E; 
}

/* Styles pour le système d'authentification */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav a {
    color: #2196F3;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav a:hover {
    background: #f0f0f0;
}

.login-form, .add-user-form {
    max-width: 400px;
    margin: 20px auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-login, .btn-add {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.btn-login:hover, .btn-add:hover {
    background: #45a049;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #ffcdd2;
}

.success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c8e6c9;
}

.login-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
}

.add-user-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.users-list {
    margin-top: 30px;
}

.role-admin {
    color: #d32f2f;
    font-weight: bold;
}

.role-user {
    color: #1976d2;
    font-weight: bold;
}

.btn-delete {
    background: #f44336;
    color: white;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #d32f2f;
}

.current-user {
    color: #666;
    font-style: italic;
}

/* Styles pour la PWA */
.pwa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-install {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-install:hover {
    background: #45a049;
}

.scanner-container {
    margin: 20px 0;
    text-align: center;
}

.scan-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.scan-result.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.scan-result.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Styles pour l'application mobile */
@media (display-mode: standalone) {
    body {
        padding-top: 0;
    }
    
    .container {
        margin: 10px;
        border-radius: 0;
    }
}

/* Optimisations pour mobile */
@media (max-width: 768px) {
    .pwa-header {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-install {
        margin-top: 10px;
    }
    
    #reader {
        width: 100% !important;
        max-width: 100% !important;
    }
} 