﻿/* 
 * USAutoExport Authentication Styles
 * Author: USAutoExport Team
 * Version: 1.0
 * Primary Color: #BE0012
 */

:root {
    --auth-primary: #BE0012;
    --auth-primary-dark: #A30010;
    --auth-primary-light: #E00014;
    --auth-success: #0E9F6E;
    --auth-danger: #DC2626;
    --auth-warning: #F59E0B;
    --auth-info: #3B82F6;
    --auth-dark: #1F2937;
    --auth-darker: #111827;
    --auth-light: #F9FAFB;
    --auth-lighter: #FFFFFF;
    --auth-border: #E5E7EB;
    --auth-text: #374151;
    --auth-text-light: #6B7280;
    --auth-text-lighter: #9CA3AF;
    --auth-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --auth-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --auth-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --auth-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --auth-radius: 8px;
    --auth-radius-lg: 12px;
}

/* Auth Section */
.auth-section {
    padding: 60px 0;
    min-height: calc(100vh - 300px);
    background: linear-gradient(135deg, var(--auth-light) 0%, var(--auth-lighter) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(190, 0, 18, 0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(190, 0, 18, 0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Auth Card */
.auth-card {
    background: var(--auth-lighter);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-primary-light));
}

.auth-card.register-card {
    max-width: 600px;
    margin: 0 auto;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    margin-bottom: 25px;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.05);
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--auth-dark);
    line-height: 1.2;
}

.auth-header p {
    color: var(--auth-text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Auth Form */
.auth-form {
    margin-bottom: 25px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--auth-text);
}

.auth-form label i {
    color: var(--auth-primary);
    width: 16px;
    font-size: 14px;
}

.auth-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--auth-lighter);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(190, 0, 18, 0.1);
}

.auth-form .form-control.error {
    border-color: var(--auth-danger);
}

.auth-form .form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Password Field */
.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-light);
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--auth-primary);
}

/* Password Strength */
.password-strength {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.strength-meter {
    flex: 1;
    height: 6px;
    background: var(--auth-light);
    border-radius: 3px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: var(--auth-text-light);
    min-width: 100px;
    font-weight: 500;
}

/* Password Requirements */
.password-requirements {
    margin-top: 12px;
    padding: 15px;
    background: var(--auth-light);
    border-radius: var(--auth-radius);
    list-style: none;
    font-size: 12px;
}

.password-requirements li {
    margin-bottom: 8px;
    color: var(--auth-text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li i {
    width: 14px;
    font-size: 12px;
}

.password-requirements li.valid {
    color: var(--auth-success);
}

.password-requirements li.valid i {
    color: var(--auth-success);
}

/* Form Row Grid */
.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--auth-text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

/* Terms Group */
.terms-group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

.terms-group .checkbox-label a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

.terms-group .checkbox-label a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--auth-radius);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 18px;
}

.alert-success {
    background: #DEF7EC;
    border: 1px solid #BCF0DA;
    color: var(--auth-success);
}

.alert-danger {
    background: #FEE2E2;
    border: 1px solid #FECACA;
    color: var(--auth-danger);
}

.alert-warning {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: var(--auth-warning);
}

.alert-info {
    background: #E1EFFE;
    border: 1px solid #BFDBFE;
    color: var(--auth-info);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    color: var(--auth-text-light);
    font-size: 14px;
    margin-bottom: 5px;
}

.auth-footer a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 30px 0 20px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    position: relative;
    background: var(--auth-lighter);
    padding: 0 15px;
    color: var(--auth-text-light);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    background: var(--auth-lighter);
}

.social-btn i {
    font-size: 16px;
}

.social-btn.google {
    color: #DB4437;
    border-color: #DB4437;
}

.social-btn.google:hover {
    background: #DB4437;
    color: var(--auth-lighter);
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-md);
}

.social-btn.facebook {
    color: #4267B2;
    border-color: #4267B2;
}

.social-btn.facebook:hover {
    background: #4267B2;
    color: var(--auth-lighter);
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-md);
}

/* Auth Features */
.auth-features {
    padding: 40px;
    background: var(--auth-lighter);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    position: relative;
    overflow: hidden;
}

.auth-features::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(190, 0, 18, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.feature-item {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item i {
    font-size: 48px;
    color: var(--auth-primary);
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.1);
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--auth-dark);
}

.feature-item p {
    color: var(--auth-text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .auth-features {
        padding: 30px;
    }
}

@media (max-width: 992px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
    
    .auth-features {
        display: none;
    }
    
    .auth-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 40px 20px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .form-row-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .password-strength {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 15px;
    }
    
    .auth-header h1 {
        font-size: 22px;
    }
    
    .auth-logo img {
        max-width: 140px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: slideInUp 0.5s ease;
}

.feature-item {
    animation: fadeIn 0.8s ease;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: var(--auth-lighter);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--auth-dark);
    color: var(--auth-lighter);
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 5px;
    z-index: 10;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
}