﻿/* 
 * Adegos Nube - Clean Login Styles
 * Optimized for professional enterprise experience
 */

/** {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    position: relative;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8fafc;
}*/

/* Disable text selection and context menu except for inputs */
/*body, button, textarea, select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}*/

/* Allow text selection only for input fields */
/*input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}*/

/* High performance animations */
/** {
    will-change: auto;
}*/

/* Utility classes for animations */
/*.animate {
    will-change: transform, opacity;
}

.smooth-transition {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}*/

/* Focus styles for accessibility */
/**:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}*/


:root {
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --input-bg: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
}

    /* Patrón de fondo muy sutil */
    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: radial-gradient(circle at 20px 20px, #e2e8f0 1px, transparent 1px);
        background-size: 40px 40px;
        opacity: 0.3;
        pointer-events: none;
    }

/* Contenedor principal - más compacto */
.login-container {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Header compacto */
.login-header {
    background: var(--card-bg);
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.company-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

    .company-logo:hover {
        transform: translateY(-1px);
    }

    .company-logo i {
        color: white;
        font-size: 1.25rem;
    }

.login-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Formulario compacto */
.login-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
    z-index: 1;
}



/* Botón de acceso */
.btn-login {
    width: 100%;
    height: 42px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    margin-top: 0.5rem;
}

    .btn-login:hover {
        background: var(--primary-blue-hover);
        transform: translateY(-1px);
        box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.25);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    /* Estados de carga */
    .btn-login.loading {
        color: transparent;
    }

        .btn-login.loading::after {
            content: '';
            position: absolute;
            width: 16px;
            height: 16px;
            top: 50%;
            left: 50%;
            margin-left: -8px;
            margin-top: -8px;
            border: 2px solid transparent;
            border-top-color: white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

@@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mensaje de error */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

    .error-message i {
        color: #dc2626;
        font-size: 0.875rem;
        flex-shrink: 0;
    }

/* Footer compacto */
.login-footer {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
}

.brand-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

    .brand-link:hover {
        text-decoration: underline;
    }

/* Animaciones de entrada suaves */
.login-container {
    animation: slideIn 0.3s ease-out;
}

@@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-group {
    animation: fadeIn 0.25s ease-out both;
}

    .form-group:nth-child(1) {
        animation-delay: 0.05s;
    }

    .form-group:nth-child(2) {
        animation-delay: 0.1s;
    }

    .form-group:nth-child(3) {
        animation-delay: 0.15s;
    }

.btn-login {
    animation: fadeIn 0.25s ease-out 0.2s both;
}

@@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    .login-container {
        max-width: 100%;
    }

    .login-header {
        padding: 1.25rem 1.25rem 0.875rem;
    }

    .login-form {
        padding: 1.25rem;
    }

    .login-title {
        font-size: 1.375rem;
    }
}

/* Estados hover para inputs */
.input-wrapper:hover .form-input {
    border-color: #cbd5e1;
}

.input-wrapper:hover .input-icon {
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 0.875rem 0 2.5rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    outline: none;
}

    .form-input::placeholder {
        color: var(--text-muted);
        font-size: 0.85rem;
    }

    .form-input:focus {
        border-color: var(--primary-blue);
        background: white;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    }

        .form-input:focus + .input-icon {
            color: var(--primary-blue);
        }
