:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --accent-color: #f72585;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --border-color: #dee2e6;
    --success-color: #4cc9f0;
    --error-color: #ef233c;
    --google-red: #db4437;
    --facebook-blue: #4267B2;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.auth-container {
    display: flex;
    min-height: 100vh;
}

/* Lewa kolumna - Hero */
.auth-hero {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-image: url('/assets/images/auth-bg.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    position: relative;
    display: none;
}

@media (min-width: 992px) {
    .auth-hero {
        display: block;
    }
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.9), rgba(114, 9, 183, 0.8));
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.auth-brand {
    margin-top: 2rem;
}

.logo {
    height: 40px;
    margin-bottom: 2rem;
}

.auth-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.auth-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 400px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--success-color);
}

.feature h3 {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: white;
    color: var(--primary-color);
}

/* Prawa kolumna - Formularz */
.auth-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-white);
}

@media (min-width: 992px) {
    .auth-form {
        flex: 1;
        max-width: 500px;
    }
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.oauth-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    background: var(--bg-white);
}

.oauth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.oauth-btn.google:hover {
    border-color: var(--google-red);
    color: var(--google-red);
}

.oauth-btn.facebook:hover {
    border-color: var(--facebook-blue);
    color: var(--facebook-blue);
}

.oauth-btn i {
    font-size: 1.25rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider span {
    background: var(--bg-white);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: -1;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-with-icon input::placeholder {
    color: var(--text-light);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
}

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

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

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: var(--transition);
}

.checkbox input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary i {
    font-size: 1.1rem;
}

/* Register Section */
.register-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.9375rem;
}

.register-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

.register-section a:hover {
    text-decoration: underline;
}

/* Terms Section */
.terms-section {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.terms-text {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

.cookies-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: var(--transition);
}

.cookies-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Different Account */
.different-account {
    margin-top: 2rem;
    text-align: center;
}

.different-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.different-link:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-hero {
        min-height: 300px;
    }
    
    .auth-overlay {
        padding: 2rem;
    }
    
    .auth-hero h1 {
        font-size: 2rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .form-container {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .oauth-buttons {
        gap: 0.75rem;
    }
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Error/Validation */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.input-error {
    border-color: var(--error-color) !important;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 35, 60, 0.1) !important;
}

/* Additional styles for register/forgot */
.input-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-checkboxes .checkbox {
    font-size: 0.875rem;
    line-height: 1.4;
}

.form-checkboxes a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

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

.forgot-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.forgot-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.success-message {
    text-align: center;
    padding: 2rem;
    background: rgba(76, 201, 240, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid var(--success-color);
    margin-bottom: 2rem;
}

.success-message i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-message h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.support-section {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.support-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.support-section a:hover {
    text-decoration: underline;
}

/* Form error styling */
.form-error {
    background: rgba(239, 35, 60, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: var(--error-color);
    font-size: 0.875rem;
}