﻿* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #eef6ff;
    background: #0b1f44;
}

body {
    overflow: hidden;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top left, rgba(88,166,225,.22), transparent 28%), radial-gradient(circle at bottom right, rgba(34,120,189,.24), transparent 30%), linear-gradient(135deg, #07152e 0%, #0c2a58 45%, #123e7a 100%);
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), repeating-linear-gradient( 90deg, rgba(255,255,255,.015) 0, rgba(255,255,255,.015) 1px, transparent 1px, transparent 120px );
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
    opacity: .55;
    animation: floatOrb 8s ease-in-out infinite;
}

.orb-1 {
    width: 220px;
    height: 220px;
    top: 8%;
    left: 8%;
    background: rgba(88,166,225,.20);
}

.orb-2 {
    width: 180px;
    height: 180px;
    right: 10%;
    top: 18%;
    background: rgba(255,255,255,.10);
    animation-delay: 1.2s;
}

.orb-3 {
    width: 260px;
    height: 260px;
    right: 12%;
    bottom: 8%;
    background: rgba(34,120,189,.16);
    animation-delay: 2.2s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(-14px) translateX(8px);
    }
}

.login-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    padding: 0 8px;
}

.brand-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, rgba(34,120,189,.95), rgba(88,166,225,.95));
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.18);
}

.brand-text h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -.4px;
}

.brand-text p {
    margin: 4px 0 0;
    color: rgba(255,255,255,.76);
    font-size: 14px;
}

.login-card {
    position: relative;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 20px 60px rgba(0,0,0,.26);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

    .login-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 28px;
        background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
        pointer-events: none;
    }

.login-card-header {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

    .login-card-header h2 {
        margin: 0;
        font-size: 30px;
        font-weight: 900;
        color: #fff;
    }

    .login-card-header p {
        margin: 8px 0 0;
        color: rgba(255,255,255,.72);
        font-size: 14px;
    }

.validation-summary-wrap {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.login-alert,
.login-info {
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 14px;
}

.login-alert {
    background: rgba(229,57,53,.18);
    border: 1px solid rgba(229,57,53,.32);
    color: #fff;
}

.login-info {
    background: rgba(67,160,71,.18);
    border: 1px solid rgba(67,160,71,.32);
    color: #fff;
}

.form-group {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 700;
        color: rgba(255,255,255,.82);
    }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    opacity: .85;
}

.form-control {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
    color: #fff;
    padding: 0 48px 0 42px;
    outline: none;
    font-size: 15px;
    transition: .2s ease;
}

    .form-control::placeholder {
        color: rgba(255,255,255,.50);
    }

    .form-control:focus {
        border-color: rgba(88,166,225,.85);
        box-shadow: 0 0 0 4px rgba(88,166,225,.14);
        background: rgba(255,255,255,.14);
    }

.toggle-password {
    position: absolute;
    right: 12px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.82);
    cursor: pointer;
    font-size: 16px;
}

.btn-login {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #2278bd, #58a6e1);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: .22s ease;
    box-shadow: 0 14px 34px rgba(34,120,189,.32);
}

    .btn-login:hover {
        transform: translateY(-1px);
        filter: brightness(1.03);
    }

    .btn-login.loading {
        opacity: .85;
        cursor: not-allowed;
    }

.login-footer {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.58);
}

@media (max-width: 560px) {
    .login-wrapper {
        max-width: 100%;
    }

    .login-card {
        padding: 22px;
        border-radius: 24px;
    }

    .brand-text h1 {
        font-size: 26px;
    }

    .login-card-header h2 {
        font-size: 26px;
    }
}

.selector-badge {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2278bd, #58a6e1);
    box-shadow: 0 14px 34px rgba(34,120,189,.30);
    overflow: hidden;
}

/* 🖼 versión con imagen */
.selector-badge-img {
    background: #fff;
    padding: 8px;
}

    .selector-badge-img img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* 🔥 evita que se deforme */
        border-radius: 6px;
        display: block;
    }

html, body {
    background: #f4f7fa;
    color: #00194b;
}

.login-page {
    background: radial-gradient(circle at 20% 18%, rgba(34,120,189,.16), transparent 22%), radial-gradient(circle at 82% 25%, rgba(88,166,225,.18), transparent 24%), linear-gradient(135deg, #ffffff 0%, #f4f7fa 45%, #eaf2f9 100%);
    overflow: hidden;
}

.login-overlay {
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.18)), repeating-linear-gradient( 90deg, rgba(34,120,189,.035) 0, rgba(34,120,189,.035) 1px, transparent 1px, transparent 120px );
}

.bg-orb {
    filter: blur(1px);
    opacity: .75;
    background: linear-gradient(135deg, rgba(34,120,189,.22), rgba(88,166,225,.12));
    box-shadow: 18px 18px 45px rgba(163,177,198,.32), -18px -18px 45px rgba(255,255,255,.95), inset 10px 10px 28px rgba(34,120,189,.08), inset -10px -10px 28px rgba(255,255,255,.82);
    animation: floatOrbPro 9s ease-in-out infinite;
}

.orb-1 {
    width: 260px;
    height: 260px;
    top: 7%;
    left: 8%;
}

.orb-2 {
    width: 210px;
    height: 210px;
    right: 9%;
    top: 18%;
    animation-delay: 1.2s;
}

.orb-3 {
    width: 320px;
    height: 320px;
    right: 12%;
    bottom: -8%;
    animation-delay: 2.4s;
}

@keyframes floatOrbPro {
    0%, 100% {
        transform: translate3d(0,0,0) scale(1);
    }

    50% {
        transform: translate3d(14px,-22px,0) scale(1.04);
    }
}

.login-brand {
    color: #00194b;
}

.brand-text h1 {
    color: #00194b;
    text-shadow: none;
}

.brand-text p {
    color: #6b7a8f;
}

.login-card {
    background: rgba(255,255,255,.58);
    border: 1px solid rgba(255,255,255,.82);
    box-shadow: 22px 22px 55px rgba(163,177,198,.30), -18px -18px 45px rgba(255,255,255,.95), inset 1px 1px 0 rgba(255,255,255,.85);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

    .login-card::before {
        background: linear-gradient(180deg, rgba(255,255,255,.60), rgba(255,255,255,.18));
    }

.login-card-header h2 {
    color: #00194b;
}

.login-card-header p {
    color: #6b7a8f;
}

.form-group label {
    color: #1f2a38;
}

.form-control {
    background: rgba(255,255,255,.78);
    border: 1px solid #dbe5ee;
    color: #1f2a38;
    box-shadow: inset 5px 5px 12px rgba(163,177,198,.18), inset -5px -5px 12px rgba(255,255,255,.92);
}

    .form-control::placeholder {
        color: #8b98a8;
    }

    .form-control:focus {
        border-color: #58a6e1;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(34,120,189,.10), inset 4px 4px 10px rgba(163,177,198,.14), inset -4px -4px 10px rgba(255,255,255,.90);
    }

.input-icon,
.toggle-password {
    color: #2278bd;
    opacity: .95;
}

.login-footer {
    color: #6b7a8f;
}

.login-alert {
    background: #fff1f1;
    border: 1px solid #f5b5b5;
    color: #b42318;
}

.login-info {
    background: #ecf8ee;
    border: 1px solid #bfe5c5;
    color: #2e7d32;
}

/* LOADER GLOBAL LOGIN / SELECTOR */
.global-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 25, 75, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

    .global-loader-overlay.show {
        display: flex;
    }

.cp-loader {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: transparent; /* 🔥 QUITAMOS EL CUADRO */
}

.cp-loader-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: white;
    border-radius: 50%;
    user-select: none;
}

.cp-loader-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: transparent;
    animation: cpLoaderCombined 2.3s linear infinite;
    z-index: 0;
}

.cp-loader-letter {
    display: inline-block;
    opacity: 0.4;
    transform: translateY(0);
    animation: cpLoaderLetterAnim 2.4s infinite;
    z-index: 1;
}

    .cp-loader-letter:nth-child(1) {
        animation-delay: 0s;
    }

    .cp-loader-letter:nth-child(2) {
        animation-delay: .1s;
    }

    .cp-loader-letter:nth-child(3) {
        animation-delay: .2s;
    }

    .cp-loader-letter:nth-child(4) {
        animation-delay: .3s;
    }

    .cp-loader-letter:nth-child(5) {
        animation-delay: .4s;
    }

    .cp-loader-letter:nth-child(6) {
        animation-delay: .5s;
    }

    .cp-loader-letter:nth-child(7) {
        animation-delay: .6s;
    }

    .cp-loader-letter:nth-child(8) {
        animation-delay: .7s;
    }

    .cp-loader-letter:nth-child(9) {
        animation-delay: .8s;
    }

    .cp-loader-letter:nth-child(10) {
        animation-delay: .9s;
    }

    .cp-loader-letter:nth-child(11) {
        animation-delay: 1s;
    }

    .cp-loader-letter:nth-child(12) {
        animation-delay: 1.1s;
    }

    .cp-loader-letter:nth-child(13) {
        animation-delay: 1.2s;
    }

@keyframes cpLoaderCombined {
    0% {
        transform: rotate(90deg);
        box-shadow: 0 6px 12px 0 #38bdf8 inset, 0 12px 18px 0 #005dff inset, 0 36px 36px 0 #1e40af inset, 0 0 3px 1.2px rgba(56,189,248,.3), 0 0 6px 1.8px rgba(0,93,255,.2);
    }

    25% {
        transform: rotate(180deg);
        box-shadow: 0 6px 12px 0 #0099ff inset, 0 12px 18px 0 #38bdf8 inset, 0 36px 36px 0 #005dff inset, 0 0 6px 2.4px rgba(56,189,248,.3), 0 0 12px 3.6px rgba(0,93,255,.2), 0 0 18px 6px rgba(30,64,175,.15);
    }

    50% {
        transform: rotate(270deg);
        box-shadow: 0 6px 12px 0 #60a5fa inset, 0 12px 6px 0 #0284c7 inset, 0 24px 36px 0 #005dff inset, 0 0 3px 1.2px rgba(56,189,248,.3), 0 0 6px 1.8px rgba(0,93,255,.2);
    }

    75% {
        transform: rotate(360deg);
        box-shadow: 0 6px 12px 0 #3b82f6 inset, 0 12px 18px 0 #0ea5e9 inset, 0 36px 36px 0 #2563eb inset, 0 0 6px 2.4px rgba(56,189,248,.3), 0 0 12px 3.6px rgba(0,93,255,.2), 0 0 18px 6px rgba(30,64,175,.15);
    }

    100% {
        transform: rotate(450deg);
        box-shadow: 0 6px 12px 0 #4dc8fd inset, 0 12px 18px 0 #005dff inset, 0 36px 36px 0 #1e40af inset, 0 0 3px 1.2px rgba(56,189,248,.3), 0 0 6px 1.8px rgba(0,93,255,.2);
    }
}

@keyframes cpLoaderLetterAnim {
    0%, 100% {
        opacity: .4;
        transform: translateY(0);
    }

    20% {
        opacity: 1;
        text-shadow: #f8fcff 0 0 5px;
    }

    40% {
        opacity: .7;
        transform: translateY(0);
    }
}