/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Login container */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo i {
    font-size: 2.5rem;
    color: #667eea;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.login-header p {
    color: #718096;
    font-size: 1rem;
    font-weight: 400;
}

/* Form styles */
.login-form {
    width: 100%;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

/* Fix for password input when type changes */
input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #a0aec0;
}

/* Toggle password button */
.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.toggle-password:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.toggle-password:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Ensure consistent styling for password input regardless of type */
#password {
    padding-right: 56px !important; /* Make room for toggle button */
}

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Login button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.error-message {
    padding: 12px 16px;
    background: #fed7d7;
    color: #c53030;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #feb2b2;
    margin-top: 16px;
}

.success-message {
    padding: 12px 16px;
    background: #c6f6d5;
    color: #2f855a;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #9ae6b4;
    margin-top: 16px;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    color: #718096;
    font-size: 0.85rem;
}

/* Responsive design */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 14px 14px 14px 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #password {
        padding-right: 52px !important;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

/* Animation for loading state */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Focus styles for accessibility */
.login-btn:focus,
.toggle-password:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
} 