﻿/* latin-ext */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 400;
    src: url("webfonts/QuickSandLatinExt-400.woff2") format("woff2");
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 400;
    src: url("webfonts/QuickSandLatin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    src: url("webfonts/QuickSandLatinExt-500.woff2") format("woff2");
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    src: url("webfonts/QuickSandLatin-500.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    src: url("webfonts/QuickSandLatinExt-700.woff2") format("woff2");
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    src: url("webfonts/QuickSandLatin-700.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
    --primary-color: #1868DB;
    --primary-dark: #0d4ba8;
    --williams-blue-dark: #1868DB; /* Azul oscuro principal */
    --williams-blue-sky: #64C4FF; /* Azul claro/cielo */
    --williams-blue-light: #00A0DE; /* Azul claro medio */
    --error-color: #f44336;
    --success-color: #4caf50;
    --text-muted: #6c757d;
    --bg-overlay: rgba(255, 255, 255, 0.95);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0a1f47 0%, #1868DB 45%, /* Azul Williams */
    #1868DB 55%, /* Mantiene oscuro */
    #2570cf 100% /* Apenas más claro */
    );
    position: relative;
}

/* Preloader mejorado */
#preLoader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

    #preLoader.active {
        display: flex;
    }

.contenedorLogo img {
    max-width: 150px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.contenedorTexto {
    margin-top: 20px;
    text-align: center;
    color: #A8ABAE;
    font-weight: bold;
    font-size: 18px !important;
}

/* Background animado optimizado */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.squares {
    position: absolute;
    background: linear-gradient(135deg, rgba(9, 112, 222, 0.4) 0%, rgba(10, 190, 250, 0.3) 100%);
    border-radius: 30%;
    backdrop-filter: blur(2px);
    will-change: transform;
}

.square1 {
    width: min(300px, 40vw);
    height: min(300px, 40vw);
    left: 3%;
    top: -15%;
    animation: float1 20s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(24, 104, 219, 0.5) 0%, rgba(100, 196, 255, 0.3) 100%);
}

.square2 {
    width: min(400px, 50vw);
    height: min(400px, 50vw);
    right: -5%;
    top: -10%;
    animation: float2 25s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(0, 160, 222, 0.4) 0%, rgba(100, 196, 255, 0.35) 100%);
}

.square3 {
    width: min(200px, 30vw);
    height: min(200px, 30vw);
    left: -5%;
    bottom: 5%;
    animation: float3 15s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(24, 104, 219, 0.25) 0%, rgba(0, 160, 222, 0.15) 100%);
}

.square4 {
    width: min(100px, 15vw);
    height: min(100px, 15vw);
    right: 27%;
    top: 70%;
    animation: float4 18s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(100, 196, 255, 0.8) 0%, rgba(0, 160, 222, 0.6) 100%);
}

.square5 {
    width: min(250px, 35vw);
    height: min(250px, 35vw);
    left: 32%;
    bottom: 29%;
    animation: float5 22s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(24, 104, 219, 0.2) 0%, rgba(100, 196, 255, 0.15) 100%);
    opacity: 0.15;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, 20px) rotate(5deg);
    }

    50% {
        transform: translate(0, 40px) rotate(10deg);
    }

    75% {
        transform: translate(-20px, 20px) rotate(5deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-30px, 30px) rotate(-8deg);
    }

    66% {
        transform: translate(-15px, -15px) rotate(-4deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, -30px) rotate(6deg);
    }
}

@keyframes float4 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

@keyframes float5 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(15px, -15px) rotate(3deg);
    }

    66% {
        transform: translate(-15px, 15px) rotate(-3deg);
    }
}

/* Container principal */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-content {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Card mejorada con glassmorphism */
.card {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    }

.card-body {
    padding: 40px 35px;
}

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

    .logo-container img {
        max-width: 180px;
        height: auto;
    }

h4 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

/* Form groups mejorados */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(24, 104, 219, 0.1);
        background: #fff;
    }

    .form-control.is-invalid {
        border-color: var(--error-color);
    }

        .form-control.is-invalid:focus {
            box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.1);
        }

.invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--error-color);
    animation: shake 0.3s ease;
}

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

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Botones modernos */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(24, 104, 219, 0.3);
    }

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

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.2);
        transition: left 0.5s ease;
    }

    .btn-primary:hover::before {
        left: 100%;
    }

/* Alert messages */
.alert {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-left: 4px solid var(--error-color);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

.alert i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Links */
.text-muted {
    font-size: 0.9375rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 0;
}

    .text-muted a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }

        .text-muted a:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

/* Responsive */
@media (max-width: 576px) {
    .auth-wrapper {
        padding: 15px;
    }

    .card-body {
        padding: 30px 25px;
    }

    h4 {
        font-size: 1.5rem;
    }

    .logo-container img {
        max-width: 150px;
    }

    .form-control {
        font-size: 16px; /* Evita zoom en iOS */
    }
    /* Ajustar cuadrados para móvil */
    .square1, .square2, .square3, .square4, .square5 {
        opacity: 0.3;
    }
}

@media (max-width: 380px) {
    .card-body {
        padding: 25px 20px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Mejora de accesibilidad */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ocultar elementos visualmente pero mantenerlos para screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Transiciones de Vue */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* Animación para fadeOut */
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}
