/**
 * GTA - Sistema de ReporterÃ­a y AnÃ¡lisis Comercial
 * Login Styles - v2.0.0 FINAL
 * Sin mensajes de validaciÃ³n visibles por defecto
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;800;900&display=swap');

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

:root {
    --primary: #5b21b6;
    --secondary: #7c3aed;
    --accent: #8b5cf6;
    --dark-bg: #0a0e1a;
    --dark-bg-secondary: #0f1419;
    --card-bg: #161b26;
    --card-header: #0f141f;
    --input-bg: #1a2332;
    --input-bg-focus: #1f2937;
    --border: #252d3d;
    --border-focus: #5b21b6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-placeholder: #475569;
    --title-color: #6A2CCF;
    --error: #ef4444;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(91, 33, 182, 0.05) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    bottom: -175px;
    left: -175px;
    animation: float 15s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(90deg); }
    66% { transform: translate(-15px, 15px) rotate(180deg); }
}

.login-container {
    width: 100%;
    max-width: 300px;
    z-index: 1;
    margin: 0 auto;
}

.login-box {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.03);
    animation: fadeIn 0.6s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
}

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

.login-header {
    background: var(--card-header);
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.logo {
    margin-bottom: 15px;
    display: inline-block;
}

.logo svg {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 3px 10px rgba(91, 33, 182, 0.5));
}

.login-header h1 {
    color: var(--title-color);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.6;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

.login-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 14px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 6px;
    font-weight: 500;
}

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

.form-group input {
    width: 100%;
    padding: 9px 11px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.form-group input:focus {
    border-color: var(--border-focus);
    background: var(--input-bg-focus);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.form-group input.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.form-group input.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.form-group .validation-icon {
    position: absolute;
    right: 12px;
    top: 35px;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
    display: none;
}

.form-group input.error ~ .validation-icon.error-icon {
    display: block;
    color: var(--error);
}

.form-group input.success ~ .validation-icon.success-icon {
    display: block;
    color: var(--success);
}

/* OCULTAR mensajes de validaciÃ³n por defecto */
.form-group .validation-message {
    display: none !important;
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 38px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    transition: color 0.3s ease;
    font-size: 11px;
    outline: none;
    z-index: 3;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 15px;
    height: 15px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    background: var(--input-bg-focus);
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark::after {
    display: block;
}

.forgot-link {
    color: var(--text-secondary);
    font-size: 11px;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

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

.btn-login {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-primary);
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(91, 33, 182, 0.3);
    outline: none;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 33, 182, 0.4);
}

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

.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: 10px;
    border-radius: 5px;
    margin-top: 12px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-info {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 10px;
    z-index: 1;
    white-space: nowrap;
}

@media (min-width: 769px) {
    body {
        overflow: hidden;
    }
    
    .login-container {
        max-width: 750px;
        width: 90%;
    }
    
    .login-box {
        flex-direction: row;
        min-height: 420px;
    }
    
    .login-header {
        width: 40%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 30px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.03);
    }
    
    .logo svg {
        width: 68px;
        height: 68px;
    }
    
    .login-header h1 {
        font-size: 27px;
        letter-spacing: 3px;
    }
    
    .subtitle {
        font-size: 11px;
    }
    
    .subtitle .mobile-text {
        display: none;
    }
    
    .subtitle .full-text {
        display: inline;
    }
    
    .login-form {
        width: 60%;
        padding: 40px 35px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .form-group input {
        padding: 11px 13px;
        font-size: 13px;
    }
    
    .password-wrapper input {
        padding-right: 40px;
    }
    
    .form-group .validation-icon {
        top: 38px;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 100%;
        max-width: 300px;
    }
    
    .subtitle .full-text {
        display: none;
    }
    
    .subtitle .mobile-text {
        display: inline;
    }
}
