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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Styles */
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-title {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-label {
    color: #555;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

/* Button Styles */
.btn-primary,
.btn-success,
.btn-warning {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    margin-top: 10px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

/* Link Styles */
.back-link {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    display: inline-block;
    margin: 10px 0;
    padding: 10px 0;
}

.back-link:hover {
    text-decoration: underline;
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.form-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 0;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Alert and Messages */
.login-alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.message-success {
    color: #28a745;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8fff9;
    border-radius: 8px;
    border: 1px solid #d4edda;
}

.qr-notice {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #e0e0e0;
    color: #555;
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background-color: white;
    }
    
    .login-wrapper {
        padding: 0;
        align-items: flex-start;
        min-height: 100vh;
    }
    
    .login-card {
        max-width: 100%;
        padding: 30px 20px;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .login-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .form-input {
        padding: 18px;
        font-size: 17px;
        border-radius: 12px;
    }
    
    .btn-primary,
    .btn-success,
    .btn-warning {
        padding: 18px;
        font-size: 18px;
        border-radius: 12px;
    }
    
    .form-label {
        font-size: 17px;
    }
    
    .back-link,
    .form-links a {
        font-size: 17px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-card {
        max-width: 450px;
        padding: 35px;
    }
    
    .login-title {
        font-size: 26px;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    .login-card {
        max-width: 420px;
        padding: 40px;
    }
    
    .login-title {
        font-size: 28px;
    }
}

/* Animation for form switching */
.login-form {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}