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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 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: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 20px;
}

h2 {
    color: #555;
    font-size: 1.5em;
    margin-bottom: 15px;
}

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

/* Forms */
form {
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
button,
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary,
button[type="submit"] {
    background: #667eea;
    color: white;
}

.btn-primary:hover,
button[type="submit"]:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Messages */
.error {
    color: #dc3545;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

.success {
    color: #28a745;
    margin-top: 10px;
    padding: 10px;
    background: #d4edda;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}

/* QR Grid */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qr-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.qr-item img {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 8px;
}

.qr-info {
    text-align: left;
}

.qr-info p {
    margin: 5px 0;
    color: #666;
}

.qr-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.qr-actions button,
.qr-actions a {
    flex: 1;
    padding: 8px;
    font-size: 14px;
}

/* Sessions Table */
.sessions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.sessions-table th,
.sessions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.sessions-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.sessions-table tr.active {
    background: #d4edda;
}

.sessions-table tr.used {
    background: #f8f9fa;
    color: #999;
}

.sessions-table tr.expired {
    background: #f8d7da;
    color: #999;
}

/* Login Form */
#login-section {
    max-width: 400px;
    margin: 100px auto;
}

#login-section input {
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .qr-grid {
        grid-template-columns: 1fr;
    }

    .sessions-table {
        font-size: 14px;
    }

    .sessions-table th,
    .sessions-table td {
        padding: 8px;
    }
}
