/* Base styles and variables */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --error-color: #ef4444;
    --success-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --background-color: #f9fafb;
    --card-background: #ffffff;
    --input-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --animation-duration: 0.3s;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
}

/* Login card styles */
.login-card {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px var(--shadow-color), 0 1px 3px var(--shadow-color);
    padding: 2rem;
    width: 100%;
}

.login-header {
    margin-bottom: 2rem;
    text-align: center;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: border-color var(--animation-duration) ease-in-out, box-shadow var(--animation-duration) ease-in-out;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Password visibility toggle */
.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

.toggle-password:hover {
    color: var(--text-color);
}

.eye-icon, .eye-off-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Checkbox styles */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    margin-bottom: 0;
    margin-left: 0.5rem;
    font-weight: normal;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* Button styles */
.login-button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color var(--animation-duration) ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-button:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Additional links */
.additional-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.additional-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--animation-duration) ease-in-out;
}

.additional-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Status message styles */
.status-message {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    display: none;
}

.status-message.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-message.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Error message styles */
.error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

/* Loading spinner */
.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header {
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .additional-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}
