:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --error-color: #f56565;
    --warning-color: #ed8936;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --background: #f7fafc;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-left {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.auth-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    z-index: 1;
}

.auth-branding i {
    font-size: 2.5rem;
}

.auth-branding h1 {
    font-size: 2rem;
    font-weight: 700;
}

.auth-illustration {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: floatCard 6s infinite ease-in-out;
}

.card-1 {
    width: 200px;
    height: 120px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.card-2 {
    width: 180px;
    height: 100px;
    top: 50%;
    right: 20%;
    animation-delay: 2s;
}

.card-3 {
    width: 160px;
    height: 90px;
    bottom: 15%;
    left: 35%;
    animation-delay: 4s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.card-header {
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-body::before,
.card-body::after {
    content: '';
    height: 10px;
    background: var(--border-color);
    border-radius: 4px;
}

.card-body::after {
    width: 70%;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 1.1rem;
}

.feature-item i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

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

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

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

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

.password-input-wrapper input {
    padding-right: 3rem !important;
}

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

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

.password-toggle:focus {
    outline: none;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--background);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-strength {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.password-strength.weak::after {
    width: 33%;
    background: var(--error-color);
}

.password-strength.medium::after {
    width: 66%;
    background: var(--warning-color);
}

.password-strength.strong::after {
    width: 100%;
    background: var(--success-color);
}

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

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

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

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

.checkbox-label a:hover {
    text-decoration: underline;
}

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

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

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 0.5rem;
}

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

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-message {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.auth-message.success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(72, 187, 120, 0.3);
    display: block;
}

.auth-message.error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(245, 101, 101, 0.3);
    display: block;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
}

.auth-switch {
    text-align: center;
    color: var(--text-light);
}

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

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.auth-footer a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-right {
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }
    
    .auth-form-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 1.5rem 1rem;
    }
    
    .auth-form-container {
        max-width: 100%;
        padding: 1.5rem 1rem;
        margin: 1rem 0;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .btn-submit {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .checkbox-group label {
        font-size: 0.875rem;
    }
    
    .auth-switch {
        font-size: 0.9rem;
    }
    
    .password-strength {
        font-size: 0.8rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .form-group input,
    .btn-submit {
        min-height: 48px;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .auth-switch a,
    .auth-footer a {
        padding: 0.5rem;
    }
}
