﻿/* ====================================
   LLAVERO QR - Variables de colores
   Archivo: wwwroot/css/llaveroqr-colores.css
   ==================================== */

:root {
    /* COLORES PRINCIPALES LLAVERO QR */
    --cocrianza-coral-suave: #1B4B8C; /* Azul corporativo (reemplaza coral) */
    --cocrianza-coral-suave-rgb: 27, 75, 140;
    --cocrianza-verde-salvia: #7CB342; /* Verde tecnológico (reemplaza verde salvia) */
    --cocrianza-verde-salvia-rgb: 124, 179, 66;
    --cocrianza-gris-calido: #2C2C2C; /* Gris oscuro textos */
    --cocrianza-gris-calido-rgb: 44, 44, 44;
    --cocrianza-gris-perla: #C0C0C0; /* Gris plata bordes */
    --cocrianza-gris-perla-rgb: 192, 192, 192;
    --cocrianza-melocoton-claro: #F8F9FA; /* Fondo claro neutro */
    --cocrianza-melocoton-claro-rgb: 248, 249, 250;
    --cocrianza-beige-neutro: #FFFFFF; /* Blanco puro */
    --cocrianza-beige-neutro-rgb: 255, 255, 255;
    /* ESTADOS - Adaptados a LLaveroQR */
    --cocrianza-exito-principal: #7CB342; /* Verde QR para éxitos */
    --cocrianza-exito-secundario: #689F38;
    /* Colores hover y estados activos */
    --llaveroqr-azul-hover: #163A6F; /* Azul más oscuro para hover */
    --llaveroqr-verde-hover: #689F38; /* Verde más oscuro para hover */
}

/* SOBRESCRITURAS ESPECÍFICAS PARA BOTONES DEL LOGIN */
.btn-cocrianza-primary:hover {
    background-color: var(--llaveroqr-azul-hover) !important;
    border-color: var(--llaveroqr-azul-hover) !important;
}

.btn-cocrianza-secondary:hover {
    background-color: var(--llaveroqr-verde-hover) !important;
    border-color: var(--llaveroqr-verde-hover) !important;
}

/* ENLACES Y ELEMENTOS ACTIVOS */
.wizard-card a {
    color: var(--cocrianza-coral-suave) !important;
}

    .wizard-card a:hover {
        color: var(--llaveroqr-azul-hover) !important;
    }

body {
    background: linear-gradient(135deg, #1B4B8C 0%, #7CB342 100%), repeating-linear-gradient( 45deg, transparent, transparent 10px, rgba(255,255,255,0.08) 10px, rgba(255,255,255,0.08) 20px ), repeating-linear-gradient( -45deg, transparent, transparent 15px, rgba(255,255,255,0.05) 15px, rgba(255,255,255,0.05) 30px ) !important;
    background-size: 100% 100%, 40px 40px, 60px 60px !important;
    animation: qrPattern 25s linear infinite !important;
}

/* Animación del patrón QR */
@keyframes qrPattern {
    0% {
        background-position: 0% 0%, 0px 0px, 0px 0px;
    }

    25% {
        background-position: 25% 25%, 10px 10px, -15px 15px;
    }

    50% {
        background-position: 50% 50%, 20px 20px, -30px 30px;
    }

    75% {
        background-position: 75% 75%, 30px 30px, -45px 45px;
    }

    100% {
        background-position: 100% 100%, 40px 40px, -60px 60px;
    }
}

/* Mejorar el fondo animado existente */
.login-background {
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 40%), radial-gradient(circle at 80% 70%, rgba(124,179,66,0.15) 0%, transparent 40%), radial-gradient(circle at 40% 90%, rgba(27,75,140,0.1) 0%, transparent 50%) !important;
    animation: qrFloat 20s ease-in-out infinite !important;
}

.logo-img {
    max-height: 100px;
    width: auto;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-8px) rotate(0.5deg);
    }

    66% {
        transform: translateY(4px) rotate(-0.5deg);
    }
}

@keyframes qrFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.8;
    }

    33% {
        transform: translateY(-15px) rotate(1deg);
        opacity: 1;
    }

    66% {
        transform: translateY(8px) rotate(-1deg);
        opacity: 0.9;
    }
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 25px 50px rgba(27, 75, 140, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decoración sutil en la tarjeta */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #1B4B8C, #7CB342, #1B4B8C) !important;
    height: 5px !important;
    border-radius: 24px 24px 0 0;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.logo-placeholder {
    width: 200px;
    height: 80px;
    /*background: var(--cocrianza-coral-suave);*/
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-family: var(--cocrianza-font-titulares);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    /*box-shadow: 0 8px 20px rgba(255, 183, 165, 0.25);*/
}

.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-title {
    font-family: var(--cocrianza-font-titulares);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--cocrianza-gris-calido);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: var(--cocrianza-gris-calido);
    opacity: 0.8;
    font-size: 0.95rem;
}

/* ========================================
   BOTÓN GOOGLE
======================================== */
.google-btn {
    background: white;
    border: 2px solid var(--cocrianza-gris-perla);
    border-radius: 14px;
    padding: 0.875rem 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--cocrianza-gris-calido);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

    .google-btn:hover {
        border-color: var(--cocrianza-coral-suave);
        background: var(--cocrianza-melocoton-claro);
        color: var(--cocrianza-gris-calido);
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 183, 165, 0.15);
    }

.google-icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   DIVIDER
======================================== */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--cocrianza-gris-calido);
    opacity: 0.7;
    font-size: 0.9rem;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--cocrianza-gris-perla);
        z-index: 1;
    }

    .divider span {
        background: rgba(255, 255, 255, 0.95);
        padding: 0 1rem;
        position: relative;
        z-index: 2;
    }

/* ========================================
   FORMULARIO - INPUTS MEJORADOS
======================================== */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-weight: 500;
    color: var(--cocrianza-gris-calido);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .form-label i {
        color: var(--cocrianza-coral-suave);
        font-size: 0.9rem;
    }

.form-control {
    border: 2px solid var(--cocrianza-gris-perla);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
}

    .form-control:focus {
        border-color: var(--cocrianza-coral-suave);
        box-shadow: 0 0 0 3px rgba(255, 183, 165, 0.1);
        background: white;
        outline: none;
    }

    .form-control::placeholder {
        color: rgba(107, 107, 107, 0.6);
    }

/* ========================================
   PASSWORD INPUT CON TOGGLE
======================================== */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cocrianza-gris-calido);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
    z-index: 3;
}

    .password-toggle:hover {
        color: var(--cocrianza-coral-suave);
        transform: translateY(-50%) scale(1.1);
    }

    .password-toggle i {
        font-size: 0.9rem;
    }

/* ========================================
   OPCIONES DEL FORMULARIO
======================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-me .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--cocrianza-gris-perla);
    border-radius: 4px;
    background-color: white;
    transition: all 0.3s ease;
}

    .form-check-input:checked {
        background-color: var(--cocrianza-coral-suave);
        border-color: var(--cocrianza-coral-suave);
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 3px rgba(255, 183, 165, 0.1);
    }

.form-check-label {
    font-size: 0.9rem;
    color: var(--cocrianza-gris-calido);
    margin: 0;
}

.forgot-link {
    color: var(--cocrianza-coral-suave);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

    .forgot-link:hover {
        color: var(--cocrianza-coral-suave);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .forgot-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 1px;
        background: var(--cocrianza-coral-suave);
        transition: width 0.3s ease;
    }

    .forgot-link:hover::after {
        width: 100%;
    }

/* ========================================
   RECAPTCHA
======================================== */
.recaptcha-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.g-recaptcha {
    transform: scale(0.95);
    transform-origin: 0 0;
}

/* ========================================
   BOTONES
======================================== */
.btn-cocrianza-primary {
    background: linear-gradient(135deg, var(--cocrianza-coral-suave), var(--cocrianza-verde-salvia));
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 183, 165, 0.3);
}

    .btn-cocrianza-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255, 183, 165, 0.4);
        background: linear-gradient(135deg, var(--cocrianza-verde-salvia), var(--cocrianza-coral-suave));
        color: white;
    }

    .btn-cocrianza-primary:active {
        transform: translateY(0);
    }

/* ========================================
   AUTH TOGGLE
======================================== */
.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 183, 165, 0.2);
}

.auth-toggle-text {
    color: var(--cocrianza-gris-calido);
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.auth-toggle-link {
    color: var(--cocrianza-coral-suave);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

    .auth-toggle-link:hover {
        color: var(--cocrianza-coral-suave);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .auth-toggle-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--cocrianza-coral-suave);
        transition: width 0.3s ease;
    }

    .auth-toggle-link:hover::after {
        width: 100%;
    }

/* ========================================
   TRUST SECTION
======================================== */
.trust-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 183, 165, 0.2);
}

.trust-text {
    font-size: 0.85rem;
    color: var(--cocrianza-gris-calido);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--cocrianza-gris-calido);
    opacity: 0.9;
}

    .trust-badge i {
        color: var(--cocrianza-verde-salvia);
        font-size: 0.9rem;
    }

/* ========================================
   VALIDACIONES
======================================== */
.text-danger {
    color: #dc3545 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #721c24;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 576px) {
    .login-card {
        margin: 0.5rem;
        padding: 1.5rem;
        border-radius: 20px;
        max-width: 100%;
    }

    .logo-placeholder {
        width: 160px;
        height: 64px;
        font-size: 1.2rem;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .g-recaptcha {
        transform: scale(0.85);
    }

    .trust-badges {
        gap: 1rem;
        justify-content: space-around;
    }

    .trust-badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .login-container {
        padding: 0.5rem;
    }

    .login-card {
        padding: 1.25rem;
    }

    .logo-placeholder {
        width: 140px;
        height: 56px;
        font-size: 1.1rem;
    }

    .g-recaptcha {
        transform: scale(0.8);
    }
}
