/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header and Navigation */
header {
    background-color: #007bff;
    color: #fff;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 {
    text-align: center;
    margin-bottom: 1rem;
}

nav {
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem;
    display: block;
    transition: all 0.3s;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Main Content */
main {
    min-height: calc(100vh - 160px);
    padding-bottom: 2rem;
}

section {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

h2 {
    color: #007bff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

h3 {
    color: #495057;
    margin-bottom: 1rem;
}

/* Buttons and Form Elements */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0069d9;
}

.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Message Styles */
.message-container {
    margin-bottom: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 4px;
    background-color: #d4edda;
    color: #155724;
    margin-bottom: 1rem;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Home Page */
.welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.stats-overview {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.stat-box {
    flex: 1;
    text-align: center;
    background-color: #e9ecef;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 0 0.5rem 1rem;
    min-width: 200px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

.quick-links {
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Upload Page */
.upload-options {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.upload-csv,
.manual-entry {
    flex: 1;
    min-width: 300px;
}

/* QR Scanner */
.qr-scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#reader {
    width: 100%;
    max-width: 500px;
    margin-bottom: 1rem;
}

.scan-result {
    margin-top: 1rem;
    text-align: center;
}

/* Manual Check-in */
.search-results {
    margin-top: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f1f3f5;
}

.selected-user {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 4px;
    display: none;
}

/* Status Page */
.status-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 4px;
}

.user-details {
    margin-bottom: 1rem;
}

.checkin-status {
    padding: 0.8rem;
    border-radius: 4px;
}

.checked-in {
    background-color: #d4edda;
    color: #155724;
}

.not-checked-in {
    background-color: #f8d7da;
    color: #721c24;
}

.not-found {
    background-color: #f8d7da;
    color: #721c24;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    color: #6c757d;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .stats-overview {
        flex-direction: column;
    }
    
    .stat-box {
        margin: 0 0 1rem 0;
    }
}
