* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
}

.container {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

form h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

form div {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 0.875rem 1rem;
    box-sizing: border-box;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="date"]:hover {
    border-color: #bbb;
}

button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#error-message {
    color: #d93025;
    margin-bottom: 1rem;
    font-weight: 600;
    padding: 0.75rem;
    background-color: #fee;
    border-radius: 8px;
    border-left: 4px solid #d93025;
}

hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2rem 0;
}

#qr-result {
    display: none;
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#qr-result h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.25rem;
}

#qr-result p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.875rem;
    font-style: italic;
}

#qr-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border: 4px solid #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    background: #fff;
    padding: 1rem;
}

.logout-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.875rem 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.logout-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    text-decoration: none;
}

.logout-link:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        max-width: 100%;
    }

    form h2 {
        font-size: 1.5rem;
    }

    input[type="text"],
    input[type="password"],
    input[type="date"] {
        padding: 0.75rem;
    }

    button {
        padding: 0.875rem;
    }

    .logout-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
}