:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #f59e0b;
    --dark: #1f2937;
    --light: #f8fafc;
    --gray: #6b7280;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 700px;
}

.auth-hero {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
}

.auth-content {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 2rem;
    display: inline-block;
}

.logo span {
    color: var(--secondary);
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.auth-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

/* Message Box Styles */
.message-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    display: none;
}

.message-box.error {
    background: #fef2f2;
    color: var(--error);
    border-left: 4px solid var(--error);
}

.message-box.success {
    background: #f0fdf4;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.message-box.warning {
    background: #fffbeb;
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.message-box i {
    font-size: 1.25rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group label i {
    color: var(--primary);
    width: 16px;
}

.form-control {
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Enhanced Password Input with Integrated Toggle */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-container .form-control {
    padding-right: 3.5rem; /* Space for the toggle button */
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: #f1f5f9;
    color: var(--primary);
}

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

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input {
    width: 16px;
    height: 16px;
}

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

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

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-google {
    background: var(--white);
    color: var(--dark);
    border: 2px solid #e5e7eb;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: var(--primary);
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--gray);
}

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

.auth-footer a:hover {
    color: var(--primary-dark);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.features-list li i {
    color: var(--secondary);
    font-size: 1.25rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.auth-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.auth-forms {
    position: relative;
}

.auth-form-panel {
    display: none;
}

.auth-form-panel.active {
    display: flex;
    flex-direction: column;
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: var(--transition);
}

.strength-text {
    font-size: 0.875rem;
    color: var(--gray);
}

.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.terms-agreement input {
    margin-top: 0.25rem;
}

.terms-agreement label {
    font-size: 0.875rem;
    color: var(--gray);
}

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

.terms-agreement a:hover {
    color: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        flex-direction: column;
        max-width: 600px;
    }

    .auth-hero {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .auth-content {
        padding: 2rem;
    }

    .auth-header h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .auth-content, .auth-hero {
        padding: 1.5rem;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .auth-tab {
        padding: 0.75rem 1rem;
    }
}