/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Navigation Styles */
nav {
    background-color: #333;
    color: white;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav-links a:hover {
    background-color: #444;
    border-radius: 4px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: #ccc;
}

.nav-user a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color: #444;
    border-radius: 4px;
}

.nav-user a:hover {
    background-color: #555;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-button:hover {
    background-color: #0056b3;
}

/* Unified Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

.data-table .action-button {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.data-table .action-button:hover {
    background-color: #0056b3;
}

.data-table .action-button.delete {
    background-color: #dc3545;
}

.data-table .action-button.delete:hover {
    background-color: #c82333;
}

.data-table .action-button.edit {
    background-color: #28a745;
}

.data-table .action-button.edit:hover {
    background-color: #218838;
}

/* Status Indicators */
.data-table .status-active,
.data-table .status-completed,
.data-table .status-available {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #d4edda;
    color: #155724;
}

.data-table .status-inactive,
.data-table .status-pending,
.data-table .status-unavailable {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #f8d7da;
    color: #721c24;
}

.data-table .no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

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

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Scanner Styles */
.scan-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.viewport {
    width: 100%;
    height: 400px;
    background-color: #f5f5f5;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.viewport canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.viewport canvas.drawingBuffer {
    z-index: 1;
}

.video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scan-form .form-group {
    margin-bottom: 1.5rem;
}

.scan-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.scan-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.scan-form input[readonly] {
    background-color: #f5f5f5;
}

/* Scan Controls */
.scan-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.scan-button {
    padding: 0.75rem 1.5rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.scan-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.scan-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.debug-info {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-family: monospace;
    color: #666;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Logout Button Styles */
.logout-form {
    margin: 0;
    padding: 0;
}

.logout-button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0.5rem 1rem;
    color: #ddd;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.logout-button:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.remember-me-group {
    display: flex;
    align-items: center;
    gap: 0.5em;
    justify-content: flex-start;
    width: auto;
} 

.remember-me-group input, .remember-me-group label {
    width: auto;
    display: inline-block;
    margin-bottom: 0;
} 