* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-container h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
}

.logout-btn {
    width: auto;
    padding: 8px 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.nav {
    background: #f8f9fa;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #ddd;
}

.nav a {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border-right: 1px solid #ddd;
    font-weight: 500;
    transition: all 0.3s;
}

.nav a:last-child {
    border-right: none;
}

.nav a.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.nav a:hover {
    background: white;
}

.content {
    padding: 30px;
}

.scanner-container {
    max-width: 600px;
    margin: 20px auto;
    border: 3px solid #667eea;
    border-radius: 10px;
    overflow: hidden;
}

#reader, #readerOut {
    width: 100%;
}

.tool-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.tool-info h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.tool-info p {
    margin: 8px 0;
    font-size: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f8f9fa;
}

td input, td select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons button {
    width: auto;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #757F9A 0%, #D7DDE8 100%);
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: none;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.qr-modal.active {
    display: flex;
}

.qr-modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
}

.qr-modal-content h3 {
    color: #667eea;
    margin-bottom: 20px;
}

#qrcode {
    margin: 20px auto;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
}

.book-out-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.hidden {
    display: none;
}

.print-btn {
    width: auto;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
    }

    .nav a {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .content {
        padding: 15px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px;
    }
}
