/* ===================================================
   SICOAS - Login Unificado - Tema Tecnológico
   Colores: #519BE9 (Azul), #D44A59 (Coral), #F0C6A3 (Beige), #000000 (Negro), #FFFFFF (Blanco)
   =================================================== */

/* Variables de colores SICOAS */
:root {
    --primary: #519BE9;
    --primary-dark: #3d7cc4;
    --primary-light: #7bb5f0;
    --secondary: #D44A59;
    --secondary-dark: #b83d4a;
    --accent: #F0C6A3;
    --accent-dark: #d4a882;
    --dark: #000000;
    --dark-soft: #1a1a1a;
    --light-bg: #FFFFFF;
    --light-surface: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-muted: #555555;
    --gradient-tech: linear-gradient(135deg, #519BE9 0%, #3d7cc4 50%, #1a1a1a 100%);
    --gradient-blue: linear-gradient(135deg, #519BE9 0%, #7bb5f0 100%);
    --gradient-main: linear-gradient(135deg, #519BE9 0%, #D44A59 100%);
    --shadow-blue: 0 4px 20px rgba(81, 155, 233, 0.25);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #fff8f5 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Patrón tecnológico de fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(81, 155, 233, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(81, 155, 233, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(212, 74, 89, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* Contenedor Principal del Login */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background-color: var(--light-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-strong), 0 0 60px rgba(81, 155, 233, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin: 20px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(81, 155, 233, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sección de Información (Izquierda) - Tema Claro */
.info-section {
    background: var(--light-bg);
    position: relative;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: center;
    overflow: hidden;
    border-right: 1px solid rgba(81, 155, 233, 0.1);
}

/* Patrón decorativo sutil */
.info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(81, 155, 233, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(212, 74, 89, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(81, 155, 233, 0.03) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

/* Borde decorativo sutil */
.info-section::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid rgba(81, 155, 233, 0.15);
    border-radius: 12px;
    pointer-events: none;
}

.info-content {
    position: relative;
    z-index: 1;
}

.info-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: var(--dark);
}

/* Gradient text para destacar palabras - Azul a Coral */
.info-content h1 span,
.gradient-text {
    background: linear-gradient(135deg, #519BE9 0%, #D44A59 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 300px;
    margin: 0 auto;
}

/* Sección del Formulario (Derecha) */
.form-section {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--light-bg);
    position: relative;
}

/* Decoración azul sutil en el formulario */
.form-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(81, 155, 233, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.form-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(212, 74, 89, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#login-form {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

#login-form h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    position: relative;
}

/* Línea decorativa azul bajo el título */
#login-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-blue);
    border-radius: 2px;
}

.logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.logo-container img {
    max-width: 140px;
    height: auto;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 4px 15px rgba(81, 155, 233, 0.15));
}

.logo-container img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 25px rgba(81, 155, 233, 0.25));
}

/* Indicador de tipo de usuario - Azul tecnológico */
.user-type-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    background: var(--gradient-blue);
    color: white;
    font-weight: 600;
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-blue);
}

.user-type-indicator:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(81, 155, 233, 0.35);
}

.user-type-indicator.hidden {
    display: none;
}

.user-type-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#user-type-icon {
    font-size: 1.3rem;
}

#user-type-text {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* Grupos de inputs */
.input-group {
    margin-bottom: 22px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-group.hidden {
    display: none;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.input-group:focus-within label {
    color: var(--primary);
    transform: translateX(5px);
}

.input-group input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background-color: var(--light-bg);
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-group input::placeholder {
    color: #999;
}

.input-group input:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 10px rgba(81, 155, 233, 0.1);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--light-bg);
    box-shadow: 0 0 0 4px rgba(81, 155, 233, 0.15), 0 4px 20px rgba(81, 155, 233, 0.1);
    transform: translateY(-2px);
}

/* Hint debajo del input */
.input-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: normal;
    line-height: 1.4;
    transition: all 0.3s ease;
}

/* Botón de login - Azul tecnológico con hover coral */
button {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--light-bg);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-blue);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo hover */
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(81, 155, 233, 0.4);
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Mensaje de error */
.error-message {
    color: var(--secondary);
    text-align: center;
    margin-top: 18px;
    min-height: 24px;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 12px;
    border-radius: 10px;
    background-color: rgba(212, 74, 89, 0.08);
    border: 1px solid rgba(212, 74, 89, 0.2);
    display: none;
}

.error-message:not(:empty) {
    display: block;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Estado de carga del botón */
button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 50%;
    margin-left: -11px;
    margin-top: -11px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ---- RESPONSIVIDAD ---- */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 20px;
    }

    .info-section {
        padding: 40px 30px;
        min-height: 180px;
    }

    .info-section::after {
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
    }

    .info-content h1 {
        font-size: 2rem;
    }

    .info-content p {
        font-size: 1rem;
    }

    .form-section {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 10px;
        border-radius: 20px;
    }

    .info-section {
        padding: 30px 20px;
        min-height: 150px;
    }

    .info-content h1 {
        font-size: 1.6rem;
    }

    .form-section {
        padding: 30px 25px;
    }

    #login-form h2 {
        font-size: 1.5rem;
    }

    .user-type-indicator {
        font-size: 0.85rem;
        padding: 10px 16px;
    }

    .input-group input {
        padding: 14px 14px;
        font-size: 0.95rem;
    }

    button {
        padding: 14px;
        font-size: 1rem;
    }
}

/* Scrollbar estilizado - Azul */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selección de texto - Azul */
::selection {
    background: rgba(81, 155, 233, 0.3);
    color: var(--text-dark);
}

/* ========================================
   MICRO-INTERACCIONES - LOGIN
   ======================================== */

/* Efecto de brillo en el botón */
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

/* Efecto de escala en botón al click */
button:active:not(:disabled) {
    transform: scale(0.97);
}

/* Efecto de focus mejorado en inputs */
.input-group input {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-group input:focus {
    transform: translateY(-2px);
}

/* Animación del logo */
.logo-container img {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-container img:hover {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 10px 30px rgba(81, 155, 233, 0.3));
}

/* Efecto hover en el indicador de usuario */
.user-type-indicator {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-type-indicator:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Animación de las partículas en info-section */
.info-section::before {
    animation: floatParticles 10s ease-in-out infinite;
}

@keyframes floatParticles {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
        opacity: 0.8;
    }
}

/* Efecto de pulso sutil en el botón */
@keyframes buttonPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(81, 155, 233, 0.25);
    }

    50% {
        box-shadow: 0 4px 30px rgba(81, 155, 233, 0.4);
    }
}

button:not(:disabled) {
    animation: buttonPulse 3s infinite;
}

button:hover {
    animation: none;
}

/* Efecto de label animado */
.input-group label {
    transition: all 0.3s ease;
}

.input-group:focus-within label {
    transform: translateX(5px);
    color: var(--primary);
}

/* Animación del borde decorativo */
.info-section::after {
    transition: all 0.5s ease;
}

.info-section:hover::after {
    border-color: rgba(81, 155, 233, 0.3);
}

/* Efecto de hover en info-content */
.info-content {
    transition: all 0.5s ease;
}

.info-section:hover .info-content {
    transform: translateY(-5px);
}

/* Transición suave para el contenedor */
.login-container {
    transition: all 0.5s ease;
}

.login-container:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 80px rgba(81, 155, 233, 0.1);
}

/* Cursor para elementos interactivos */
button,
input,
.logo-container img {
    cursor: pointer;
}

input {
    cursor: text;
}

/* Eliminar highlight en dispositivos táctiles */
button,
input,
a {
    -webkit-tap-highlight-color: transparent;
}