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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
}

.login-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

/* Form */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Validation States */
.form-group input.valid {
    border-color: #22c55e;
}

.form-group input.invalid {
    border-color: #ef4444;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox input {
    width: auto;
    margin: 0;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

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

.btn-full {
    width: 100%;
}

/* Footer */
.login-footer {
    text-align: center;
}

.login-footer p {
    color: #666;
    margin-bottom: 1rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.back-link:hover {
    color: #667eea;
}

/* Dark Theme */
.theme-dark body {
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
}

.theme-dark .login-card {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid #1f2937;
}

.theme-dark .login-header h2 {
    color: #e2e8f0;
}

.theme-dark .login-header p {
    color: #94a3b8;
}

.theme-dark .form-group label {
    color: #e2e8f0;
}

.theme-dark .form-options .checkbox {
    color: #cbd5e1;
}

.theme-dark .forgot-link {
    color: #a5b4fc;
}

.theme-dark .forgot-link:hover {
    color: #c7d2fe;
}

.theme-dark .login-footer p {
    color: #cbd5e1;
}

.theme-dark .login-footer a {
    color: #a5b4fc;
}

.theme-dark .login-footer a:hover {
    color: #c7d2fe;
}

.theme-dark .back-link {
    color: #94a3b8;
}

.theme-dark .back-link:hover {
    color: #a5b4fc;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
