﻿:root {
    /* Paleta de colores institucional */
    --primary-color: #0a1e40;
    --primary-light: #1a315b;
    --primary-dark: #06132a;
    --accent-color: #254b8a;
    --accent-light: #3971b6;
    --light-color: #f8f9fa;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    /* Colores de alerta refinados */
    --danger: #c42b38;
    --danger-light: #f8d7da;
    --success: #0e6a43;
    --warning: #e19a00;
    --info: #3971b6;
    /* RGB values para transparencias */
    --primary-color-rgb: 10, 30, 64;
    --primary-light-rgb: 26, 49, 91;
    --primary-dark-rgb: 6, 19, 42;
    --accent-color-rgb: 37, 75, 138;
    --accent-light-rgb: 57, 113, 182;
    --success-rgb: 14, 106, 67;
    --danger-rgb: 196, 43, 56;
    --warning-rgb: 225, 154, 0;
    --light-color-rgb: 248, 249, 250;
    /* Variables para diseño */
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --card-border-radius: 0.75rem;
    --box-shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
    --box-shadow-md: 0 2px 8px rgba(0,0,0,0.07);
    --box-shadow-lg: 0 4px 16px rgba(0,0,0,0.09);
    --primary-hover: #11264d;
    --primary-shadow: rgba(10, 30, 64, 0.2);
    --text-color-light: #ffffff;
    --text-color-dark: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ecf3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-dark);
    line-height: 1.6;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(10, 30, 64, 0.02) 50%, transparent 70%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(-100px) translateY(-50px); }
    50% { transform: translateX(100px) translateY(50px); }
}

.decorative-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.12;
    transition: var(--transition);
    filter: blur(0.5px);
}

.shape-circle {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.8) 0%, rgba(var(--accent-color-rgb), 0.6) 50%, rgba(var(--accent-light-rgb), 0.4) 100%);
    border-radius: 50%;
    top: -80px;
    left: -80px;
    animation: floatSlow 12s ease-in-out infinite;
    box-shadow: 0 30px 60px rgba(var(--primary-color-rgb), 0.15);
}

.shape-circle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(var(--light-color-rgb), 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseGlow 8s ease-in-out infinite;
}

.shape-geometric {
    width: 200px;
    height: 260px;
    background: linear-gradient(145deg, rgba(var(--accent-color-rgb), 0.7) 0%, rgba(var(--accent-light-rgb), 0.5) 100%);
    border-radius: 20px 20px 80px 20px;
    top: 40px;
    right: -60px;
    transform: rotate(15deg);
    animation: floatMedium 14s ease-in-out infinite reverse;
    box-shadow: 0 25px 50px rgba(var(--accent-color-rgb), 0.2);
}

.shape-geometric::before {
    content: "";
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    height: 4px;
    background: rgba(var(--light-color-rgb), 0.6);
    border-radius: 2px;
    animation: lineGlow 6s ease-in-out infinite;
}

.shape-geometric::after {
    content: "";
    position: absolute;
    top: 60px;
    left: 30px;
    right: 50px;
    height: 120px;
    background: repeating-linear-gradient( 0deg, rgba(var(--light-color-rgb), 0.4) 0px, rgba(var(--light-color-rgb), 0.4) 3px, transparent 3px, transparent 20px );
    border-radius: 8px;
}

.shape-organic {
    width: 250px;
    height: 250px;
    background: linear-gradient(225deg, rgba(var(--primary-light-rgb), 0.6) 0%, rgba(var(--accent-light-rgb), 0.4) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    bottom: -50px;
    left: -50px;
    animation: floatOrganic 10s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(var(--primary-light-rgb), 0.25);
}

.shape-organic::before {
    content: "";
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(var(--light-color-rgb), 0.4) 0%, transparent 70%);
    border-radius: 50% 30% 70% 40% / 60% 40% 50% 80%;
    animation: organicPulse 8s ease-in-out infinite;
}

.shape-tech {
    width: 180px;
    height: 180px;
    background: linear-gradient(45deg, rgba(var(--primary-color-rgb), 0.6) 0%, rgba(var(--accent-color-rgb), 0.4) 100%);
    border-radius: 20px;
    bottom: 60px;
    right: -40px;
    transform: rotate(-25deg);
    animation: floatTech 16s ease-in-out infinite;
    box-shadow: 0 15px 30px rgba(var(--primary-color-rgb), 0.2);
}

.shape-tech::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(var(--light-color-rgb), 0.5);
    border-radius: 12px;
    animation: borderGlow 10s ease-in-out infinite;
}

.shape-tech::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: rgba(var(--light-color-rgb), 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: centerPulse 4s ease-in-out infinite;
}

.shape-center {
    width: 120px;
    height: 120px;
    background: linear-gradient(90deg, rgba(var(--accent-color-rgb), 0.1) 0%, rgba(var(--accent-light-rgb), 0.05) 100%);
    border-radius: 50%;
    top: 20%;
    right: 20%;
    animation: floatCenter 18s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(var(--accent-color-rgb), 0.1);
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-20px) translateX(10px) rotate(2deg) scale(1.02);
    }

    50% {
        transform: translateY(-35px) translateX(0px) rotate(0deg) scale(1.05);
    }

    75% {
        transform: translateY(-15px) translateX(-8px) rotate(-1deg) scale(1.01);
    }
}

@keyframes floatMedium {
    0%, 100% {
        transform: translateY(0px) rotate(15deg) scale(1);
    }

    33% {
        transform: translateY(-25px) rotate(18deg) scale(1.03);
    }

    66% {
        transform: translateY(-12px) rotate(12deg) scale(0.98);
    }
}

@keyframes floatOrganic {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    25% {
        transform: translateY(-15px) rotate(-2deg) scale(1.02);
        border-radius: 50% 50% 60% 40% / 50% 40% 70% 60%;
    }

    50% {
        transform: translateY(-30px) rotate(0deg) scale(1.04);
        border-radius: 60% 40% 50% 60% / 60% 50% 40% 70%;
    }

    75% {
        transform: translateY(-10px) rotate(1deg) scale(0.99);
        border-radius: 45% 55% 65% 35% / 45% 55% 65% 45%;
    }
}

@keyframes floatTech {
    0%, 100% {
        transform: translateY(0px) rotate(-25deg) scale(1);
    }

    50% {
        transform: translateY(-20px) rotate(-22deg) scale(1.02);
    }
}

@keyframes floatCenter {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.06;
    }

    50% {
        transform: translateY(-15px) scale(1.1);
        opacity: 0.12;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes lineGlow {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 10px rgba(var(--light-color-rgb), 0.3);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(var(--light-color-rgb), 0.6);
    }
}

@keyframes organicPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(var(--light-color-rgb), 0.5);
        box-shadow: inset 0 0 20px rgba(var(--light-color-rgb), 0.1);
    }

    50% {
        border-color: rgba(var(--light-color-rgb), 0.8);
        box-shadow: inset 0 0 30px rgba(var(--light-color-rgb), 0.3);
    }
}

@keyframes centerPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.login-container {
    max-width: 420px;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    padding: 1rem;
}

.login-register {
    max-width: 800px;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    padding: 1rem;
}

.login-card {
    background-color: white;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    backdrop-filter: blur(10px);
}

/* Header mejorado con gradiente */
.card-header {
    background-color: #0a1e40;
    background: linear-gradient(135deg, #0a1e40 0%, #1a315b 50%, #254b8a 100%);
    background: linear-gradient(135deg, var(--primary-color, #0a1e40) 0%, var(--primary-light, #1a315b) 50%, var(--accent-color, #254b8a) 100%);
    padding: 0;
    border: none;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.logo-section {
    padding: 2rem 0rem 0rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.logo {
    width: 130px;
    height: 130px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    margin: 0 auto 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.title-text {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.3;
}

.secondary-text {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.3;
    text-align: justify;
    margin: 1rem;
}

.title-system {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.login-content {
    padding: 0.5rem 2rem 2.25rem;
    background: white;
}

.nav-pills {
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background-color: var(--gray-100);
    border-radius: 0.25rem;
}

.nav-pills .nav-link {
    border-radius: 0.25rem;
    padding: 0.6rem 1.1rem;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(10, 30, 64, 0.15);
}

.nav-pills .nav-link .bi {
    margin-right: 0.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.form-label i {
    margin-right: 0.35rem;
    font-size: 0.9rem;
}

.form-control, .form-select {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.25rem;
    transition: var(--transition);
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 104, 196, 0.1);
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-color: var(--gray-200);
}

.btn-outline-secondary {
    color: var(--primary-light);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 0.25rem;
    padding: 0.75rem 1.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 8px rgba(10, 30, 64, 0.15);
    transition: var(--transition);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(10, 30, 64, 0.2);
}

.btn-primary:active {
    background-color: var(--primary-dark);
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(10, 30, 64, 0.1);
}

.help-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.help-links a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.help-links a:hover {
    color: var(--accent-color);
}

.help-links a .bi {
    margin-right: 0.35rem;
    font-size: 0.9rem;
}

.text-danger {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Loader Styles */
/*.custom-loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    display: none;
    animation: pulse 1.5s infinite ease-in-out;
}

    .custom-loader::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 50%;
        border: 4px solid rgba(10, 30, 64, 0.1);
        border-top-color: var(--primary-color);
        border-right-color: var(--primary-color);
        animation: spin 1s infinite linear;
    }

    .custom-loader::after {
        content: "";
        position: absolute;
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
        border-radius: 50%;
        border: 3px solid transparent;
        border-top-color: var(--accent-color);
        animation: spin 1.5s infinite ease;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1049;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .overlay.active {
        opacity: 1;
    }

.loader-text {
    position: fixed;
    top: calc(50% + 50px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
    z-index: 1050;
    display: none;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-text.active {
    opacity: 1;
}*/

.custom-loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
    animation: pulse 1.5s infinite ease-in-out;
}

.custom-loader::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 3px solid rgba(44, 62, 80, 0.1);
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    animation: spin 1s infinite linear;
}

.custom-loader::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent-color);
    animation: spin 1.5s infinite ease;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
}

.loader-text {
    position: fixed;
    top: calc(50% + 40px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
    z-index: 9999;
    display: none;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-text.active {
    opacity: 1;
}

.loader-text span {
    display: inline-block;
    animation: fadeInOut 1.5s infinite;
}

.loader-text span:nth-child(2) {
    animation-delay: 0.5s;
}

.loader-text span:nth-child(3) {
    animation-delay: 1s;
}

.swal-left-text {
    text-align: justify !important;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
        transform: translateY(2px);
    }

    50% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive improvements */
@media (max-width: 480px) {
    .login-container {
        max-width: 95%;
        padding: 0.5rem;
    }

    .logo {
        width: 110px;
        height: 110px;
    }

    .title-text {
        font-size: 0.7rem;
    }

    .title-system {
        font-size: 0.9rem;
    }

    .login-content {
        padding: 1.5rem;
    }
}