/* Auth CSS Renovado - SellToIA */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ffd700;
    --success-color: #27d680;
    --error-color: #ff4757;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-primary: #fff;
    --bg-secondary: #f8f9fe;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), #ffb347);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* ===== MOBILE LAYOUT ===== */
.mobile-layout {
    display: block;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Mobile Header */
.mobile-header {
    background: var(--bg-primary);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-light);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-mobile {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-accent {
    color: var(--primary-color);
}

.header-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header-icon:hover {
    color: var(--primary-color);
}

.language-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.language-toggle:hover {
    background: var(--bg-secondary);
}

/* Mobile Auth Container */
.mobile-auth-container {
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

/* Mobile Hero Section */
.mobile-hero-section {
    position: relative;
    padding: 40px 20px;
    background: var(--gradient-primary);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.hero-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.2) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.2) 2px, transparent 2px);
    background-size: 40px 40px;
    animation: float 20s ease-in-out infinite;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.robot-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.robot-icon {
    font-size: 60px;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

.robot-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255,215,0,0.3), transparent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}
.hero-features {
    display: flex
;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.feature-item i {
    font-size: 16px;
    opacity: 0.8;
}

/* Mobile Form Container */
.mobile-form-container {
    flex: 1;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 24px 24px 0 0;
    margin-top: -20px;
    position: relative;
    z-index: 3;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.form-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: calc(var(--border-radius) - 4px);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.alert-success {
    background: rgba(39, 214, 128, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 214, 128, 0.2);
}

.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.alert-error::before {
    content: "\f071";
}

.alert-success::before {
    content: "\f00c";
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    font-size: 14px;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

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

.code-input {
    text-align: center;
    letter-spacing: 4px;
    font-size: 18px;
    font-weight: 600;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

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

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

.strength-bar.medium::after {
    width: 50%;
    background: #ff9f43;
}

.strength-bar.good::after {
    width: 75%;
    background: #feca57;
}

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

.strength-text {
    font-size: 12px;
    font-weight: 500;
}

.password-hints {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.password-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    transition: var(--transition);
}

.password-hint.valid {
    color: var(--success-color);
}

.password-hint.valid i {
    color: var(--success-color);
}

.password-hint i {
    font-size: 10px;
}

/* Auth Options */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Custom Checkboxes */
.remember-checkbox,
.terms-checkbox,
.trust-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

.remember-checkbox input,
.terms-checkbox input,
.trust-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

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

.remember-checkbox input:checked + .checkmark::after,
.terms-checkbox input:checked + .checkmark::after,
.trust-checkbox input:checked + .checkmark::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 10px;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

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

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

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

.social-btn {
    width: 100%;
    padding: 14px 24px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    margin-bottom: 16px;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.social-btn.google i {
    color: #db4437;
}

/* Divider */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

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

.divider span {
    background: var(--bg-primary);
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

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

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

/* Special Form Icons */
.security-icon,
.email-icon,
.reset-icon {
    text-align: center;
    margin-bottom: 16px;
}

.security-icon i,
.email-icon i,
.reset-icon i {
    font-size: 48px;
    color: var(--primary-color);
    opacity: 0.8;
}

/* Terms Checkbox */
.terms-checkbox {
    margin-bottom: 24px;
}

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

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

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 4px;
    min-width: 60px;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 10px;
}

/* ===== DESKTOP LAYOUT ===== */
.desktop-layout {
    display: none;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Desktop Header */
.desktop-header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.desktop-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.desktop-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.desktop-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.desktop-search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
    position: relative;
}

.desktop-search-input {
    width: 100%;
    padding: 16px 60px 16px 24px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 16px;
    background: var(--bg-primary);
    outline: none;
    transition: var(--transition);
}

.desktop-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.desktop-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.desktop-search-btn:hover {
    background: #5a6fd8;
}

.desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.desktop-header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 10px 0;
    justify-content: space-evenly;
}

.desktop-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

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

.desktop-cta-button {
    background: var(--primary-color);
    color: white;
    padding: 9px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.desktop-cta-button:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Desktop Main */
.desktop-main {
    min-height: calc(100vh - 140px);
}

.desktop-auth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 220px);
}

/* Desktop Hero Section */
.desktop-hero-section {
    position: relative;
    padding: 60px 40px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    color: white;
    text-align: center;
}

.desktop-hero-section .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.desktop-hero-section .hero-content {
    position: relative;
    z-index: 2;
}

.desktop-hero-section .robot-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.desktop-hero-section .hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.desktop-hero-section .hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.5;
}

.desktop-hero-section .hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    text-align: left;
}

.desktop-hero-section .feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.desktop-hero-section .feature-item i {
    font-size: 18px;
    opacity: 0.8;
    width: 20px;
}

/* Desktop Form Section */
.desktop-form-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-medium);
}

.desktop-form-section .form-wrapper {
    max-width: 100%;
}

.desktop-form-section .form-row {
    grid-template-columns: 1fr 1fr;
}

.desktop-form-section .form-title {
    font-size: 28px;
    text-align: left;
}

.desktop-form-section .form-subtitle {
    text-align: left;
    margin-bottom: 40px;
}

.desktop-form-section .auth-options {
    margin-bottom: 32px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (min-width: 1024px) {
    .mobile-layout {
        display: none;
    }
    
    .desktop-layout {
        display: block;
    }
}

@media (max-width: 1023px) {
    .mobile-layout {
        display: block;
    }
    
    .desktop-layout {
        display: none;
    }
}

@media (max-width: 480px) {
    .mobile-form-container {
        padding: 16px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-features {
        gap: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .password-hints {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) and (min-width: 1024px) {
    .desktop-auth-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 600px;
    }
    
    .desktop-hero-section {
        padding: 40px 32px;
    }
    
    .desktop-hero-section .hero-title {
        font-size: 32px;
    }
    
    .desktop-hero-section .hero-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Loading animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-form.active {
    animation: fadeIn 0.3s ease-in;
}

/* Focus states for accessibility */
.auth-tab:focus,
.form-control:focus,
.auth-btn:focus,
.social-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-light: #666;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}