/* ============================================
   CRM AUTOLOTE - AUTH STYLES
   Archivo: assets/css/auth.css
============================================ */

/* Variables CSS */
:root {
    /* Colores principales */
    --primary-color: #13325E;
    --primary-hover: #0f2a4d;
    --primary-light: #1e4a8a;
    --secondary-color: #1e4a8a;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-gray: #f8fafc;
    --text-color: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    
    /* Espaciado */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 40px;
    --spacing-3xl: 60px;
    
    /* Bordes */
    --border-radius-sm: 8px;
    --border-radius-md: 10px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lexend', sans-serif;
    color: var(--text-color);
    background: var(--white);
    overflow: hidden;
}

/* ============================================
   AUTH WRAPPER - SPLIT SCREEN
============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ============================================
   LEFT SIDE - LOGIN FORM
============================================ */
.auth-left {
    flex: 0 0 30%;
    max-width: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    background: var(--white);
    position: relative;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 480px;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo */
.auth-logo-container {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-logo {
    max-width: 200px;
    height: auto;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.5;
}

/* Form */
.auth-form {
    margin-bottom: var(--spacing-xl);
}

/* Floating Labels Override */
.form-floating {
    position: relative;
}

.form-floating > .form-control {
    height: 58px;
    padding: var(--spacing-md) var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 15px;
    background: var(--light-gray);
    transition: all var(--transition-normal);
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(19, 50, 94, 0.1);
    outline: none;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > label {
    padding: var(--spacing-md);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: color var(--transition-fast);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-input {
    padding-right: 50px !important;
}

/* Form Check */
.form-check {
    padding-left: 35px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: var(--spacing-xs);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(19, 50, 94, 0.1);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 500;
}

/* Auth Options */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    height: 54px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Demo Credentials */
.demo-credentials {
    margin-top: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(19, 50, 94, 0.05) 0%, rgba(30, 74, 138, 0.05) 100%);
    border: 2px solid rgba(19, 50, 94, 0.1);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    text-align: center;
}

.demo-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.demo-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.demo-item {
    font-size: 13px;
    color: var(--text-color);
}

.demo-item strong {
    color: var(--dark-color);
    font-weight: 600;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius-md);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* Footer */
.auth-footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xl);
}

.auth-footer p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   RIGHT SIDE - SLIDESHOW
============================================ */
.auth-right {
    flex: 0 0 75%;
    max-width: 75%;
    position: relative;
    background: var(--dark-color);
    overflow: hidden;
}

.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Overlay */
.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(19, 50, 94, 0.85) 0%, rgba(30, 74, 138, 0.75) 100%);
    z-index: 1;
}

/* Slides */
.slideshow-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Slide Content */
.slide-content {
    position: absolute;
    bottom: 25%;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
    padding: 0 var(--spacing-3xl);
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slide-text {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Navigation Dots */
.slideshow-dots {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 2;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.dot.active {
    background: var(--white);
    width: 32px;
    border-radius: 6px;
}

/* Features List */
.features-list {
    position: absolute;
    bottom: var(--spacing-2xl);
    left: var(--spacing-2xl);
    right: var(--spacing-2xl);
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    z-index: 2;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.feature-item i {
    color: var(--success-color);
    font-size: 16px;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

/* Tablets */
@media (max-width: 1199px) {
    .auth-left {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .auth-right {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .slide-title {
        font-size: 36px;
    }
    
    .slide-text {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-left,
    .auth-right {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .auth-right {
        min-height: 400px;
        order: -1;
    }
    
    .auth-left {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .auth-form-wrapper {
        max-width: 100%;
    }
    
    .slide-content {
        bottom: 20%;
        padding: 0 var(--spacing-xl);
    }
    
    .slide-title {
        font-size: 28px;
    }
    
    .slide-text {
        font-size: 14px;
    }
    
    .features-list {
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md);
    }
    
    .feature-item {
        font-size: 12px;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* Mobile */
@media (max-width: 576px) {
    .auth-left {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .auth-logo {
        max-width: 150px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .auth-right {
        min-height: 300px;
    }
    
    .slide-title {
        font-size: 22px;
    }
    
    .slide-text {
        font-size: 13px;
    }
    
    .features-list {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
    }
    
    .feature-item {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .demo-credentials {
        padding: var(--spacing-md);
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .auth-logo {
        max-width: 120px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .form-floating > .form-control {
        height: 52px;
        font-size: 14px;
    }
    
    .btn-login {
        height: 48px;
        font-size: 15px;
    }
}

/* ============================================
   LOADING STATES
============================================ */
.btn-spinner .spinner-border {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* ============================================
   ACCESSIBILITY
============================================ */
.form-control:focus-visible,
.form-check-input:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    .auth-right,
    .demo-credentials {
        display: none;
    }
    
    .auth-left {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

