/***********************************************************
 *
 * ECOTRACK - Estilos del Sistema de Login
 *
 * IMPORTANTE: Este archivo utiliza las variables CSS definidas
 * en variables.css. Asegúrate de importar variables.css antes
 * que este archivo.
 *
 ************************************************************/

/************************************************************
 *
 * TABLA DE CONTENIDOS
 *
 *  01. ESTILOS GENERALES
 *  02. PRELOADER
 *  03. LAYOUT
 *      03.01 PÁGINA DE LOGIN
 *      03.02 CONTENEDOR DEL FORMULARIO
 *  04. ELEMENTOS
 *      04.01 LOGO Y ENCABEZADO
 *      04.02 CAMPOS DE FORMULARIO
 *      04.03 CHECKBOX
 *      04.04 BOTONES
 *      04.05 ENLACES
 *  05. POWER BY SCORPION
 *  06. RESPONSIVE

 ************************************************************/

/*****************************/
/*  01. ESTILOS GENERALES    */
/*****************************/

html {
    font-family: sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    height: 100%;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    line-height: 1.6;
    color: var(--text-primary);
    text-align: left;
    margin: 0;
    padding: 0;
}

h2 {
    color: var(--text-white);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    margin-top: var(--spacing-sm);
}

h2 > a {
    font-weight: var(--font-weight-medium);
}

a {
    text-decoration: none;
    background-color: transparent;
    color: var(--color-primary);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-dark);
    text-decoration: none;
}

label {
    display: block;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

h3 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--text-secondary);
}

.hidden {
    display: none !important;
}

/*****************************/
/*  02. PRELOADER            */
/*****************************/

#nm-preloader {
    display: flex;
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: var(--z-preloader);
    background-color: var(--bg-white);
    justify-content: center;
    align-items: center;
}

.nm-ripple {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.nm-ripple div {
    position: absolute;
    border: 4px solid var(--color-primary);
    opacity: 1;
    border-radius: 50%;
    animation: nm-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.nm-ripple div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes nm-ripple {
    0% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        top: 0;
        left: 0;
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}

/*****************************/
/*  03. LAYOUT               */
/*****************************/

/*************************************/
/*  03.01 PÁGINA DE LOGIN            */
/*************************************/

#page-content {
    display: flex;
    position: relative;
    min-height: 100vh;
    background-image: url("../../images/logotipo/fondo.png");
    background-size: cover;
    background-position: center;
    justify-content: flex-end;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-xxl);
}

/* Overlay - sin fondo oscuro, solo para estructura */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 0;
    pointer-events: none;
}

/*************************************/
/*  03.02 CONTENEDOR DEL FORMULARIO  */
/*************************************/

.nm-tm-wr {
    position: relative;
    z-index: var(--z-base);
    width: 100%;
    max-width: 620px;
    /* background: rgba(140, 150, 160, 0.35); */
    /* backdrop-filter: blur(20px); */
    /* border-radius: 70px; */
    border: 1px solid rgba(163, 163, 163, 0.64);
    padding: 3rem 3.5rem 2.5rem;
    /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); */
    /* From https://css.glass */
    /* From https://css.glass */
    background: linear-gradient(
        to right,
        rgba(163, 163, 163, 0.16),
        rgba(163, 163, 163, 0.45)
    );
    border-radius: 70px;
    /* box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    /* border: 1px solid rgba(163, 163, 163, 0.3); */
}

/* Contenedor del formulario */
.login-form {
    width: 100%;
}

/* Logo container - modificado para el nuevo diseño */
.nm-hr {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.nm-hr img {
    max-width: 280px;
    width: 100%;
    height: auto;
}

/* Espaciados y utilidades */
.nm-mb-0 {
    margin-bottom: 0 !important;
}

.nm-mb-1 {
    margin-bottom: var(--spacing-md) !important;
}

.nm-mb-2 {
    margin-bottom: var(--spacing-xl) !important;
}

.nm-aic {
    align-items: center;
}

.nm-vh-100 {
    height: 100vh;
}

.nm-vh-md-100 {
    min-height: 100vh;
}

/*****************************/
/* 04. ELEMENTOS             */
/*****************************/

/*************************************/
/*  04.01 LOGO Y ENCABEZADO          */
/*************************************/

#logo-container {
    position: absolute;
    top: 24px;
    z-index: var(--z-dropdown);
}

#logo-container img {
    height: 50px;
}

/*************************************/
/*  04.02 CAMPOS DE FORMULARIO       */
/*************************************/

/* Grupo de input con icono */
.nm-gp {
    position: relative;
    margin-bottom: var(--spacing-md);
    padding: 0 3rem;
}

/* Icono como etiqueta fuera del input */
.nm-gp-pp {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-normal);
}

.nm-gp-pp i {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.7);
}

/* Campo de entrada */
.form-control {
    width: 100%;
    background: linear-gradient(
        90deg,
        rgba(163, 163, 163, 0.4) 0%,
        rgba(60, 70, 80, 0.6) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: #ffffff;
    padding: 0.75rem var(--spacing-md);
    height: 42px;
    transition: var(--transition-normal);
}

.form-control:focus {
    color: #ffffff;
    outline: 0;
    background: linear-gradient(
        90deg,
        rgba(164, 160, 160, 0.5) 0%,
        rgba(70, 80, 90, 0.7) 100%
    );
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 139, 254, 0.2);
}

/* Placeholders */
.form-control::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.form-control::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.form-control:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.form-control::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

/*************************************/
/*  04.03 CHECKBOX                   */
/*************************************/

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
    margin-top: 0;
    padding-left: 0.2rem;
}

.form-check input[type="checkbox"] {
    position: relative;
    left: 0;
    z-index: 1;
    width: 1rem;
    height: 1rem;
    opacity: 0;
    margin: 0;
}

.nm-check {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-weight: var(--font-weight-normal);
    font-size: 0.8125rem;
    user-select: none;
    position: relative;
    display: flex;
    align-items: center;
}

.nm-check::before {
    border-radius: var(--radius-sm);
    transition: var(--transition-slow);
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nm-check:hover::before {
    border-color: var(--color-primary);
    background-color: rgba(0, 139, 254, 0.2);
}

.nm-check::after {
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.form-check input:checked ~ .nm-check::before {
    color: var(--text-white);
    border-color: var(--color-primary);
    background-color: var(--color-primary);
}

.form-check input:checked ~ .nm-check::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
}

/*************************************/
/*  04.04 BOTONES                    */
/*************************************/

.btn-primary {
    display: inline-block;
    width: calc(100% - 6rem);
    margin: 0 3rem;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-secondary) 100%
    );
    color: var(--text-white);
    font-weight: var(--font-weight-medium);
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.75rem var(--spacing-xl);
    font-size: var(--font-size-base);
    line-height: 1.6;
    height: 46px;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #009dff 0%, #009af0 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-primary:focus {
    outline: 0;
    box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-25);
}

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

.nm-hvr {
    transition: var(--transition-fast);
}

.nm-hvr:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/*************************************/
/*  04.05 ENLACES                    */
/*************************************/

.nm-fs-1 {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
}

.nm-fs-1:hover {
    color: #ffffff;
    text-decoration: underline;
}

.nm-fw-bd {
    font-weight: var(--font-weight-medium) !important;
}

.nm-sm-tr {
    text-align: center;
}

/* Estilos adicionales para el texto centrado */
.text-center {
    text-align: center;
    margin-top: var(--spacing-md);
    padding: 0 3rem;
}

/**************************************/
/*  05. POWER BY SCORPION             */
/**************************************/

.power-by-scorpion {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    z-index: var(--z-dropdown);
    opacity: 0.9;
    transition: var(--transition-fast);
}

.power-by-scorpion:hover {
    opacity: 1;
    transform: scale(1.05);
}

.power-by-scorpion img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/*****************************/
/*  06. RESPONSIVE           */
/*****************************/

@media (max-width: 575px) {
    #page-content {
        justify-content: center;
        padding: var(--spacing-md);
    }

    .nm-tm-wr {
        padding: 2rem 1.5rem;
        margin: var(--spacing-md) 0;
        max-width: 100%;
        border-radius: 2rem;
    }

    .nm-hr {
        margin-bottom: var(--spacing-md);
    }

    .nm-hr img {
        max-width: 200px;
    }

    .nm-gp {
        padding: 0 0.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .btn-primary {
        width: calc(100% - 1rem);
        margin: 0 0.5rem;
        height: 44px;
        font-size: var(--font-size-sm);
    }

    .form-check {
        margin-left: 0.5rem;
    }

    .text-center {
        padding: 0 0.5rem;
        font-size: 0.75rem;
    }

    .power-by-scorpion {
        bottom: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .power-by-scorpion img {
        max-width: 120px;
    }

    .nm-sm-tr {
        text-align: center !important;
        margin-top: var(--spacing-sm);
    }
}

@media (min-width: 576px) {
    .nm-sm-tr {
        text-align: center !important;
    }

    .nm-mb-sm-0 {
        margin-bottom: 0 !important;
    }
}

@media (min-width: 768px) {
    #page-content {
        justify-content: flex-end;
        padding: var(--spacing-xl) 5%;
    }

    .nm-mb-md-2 {
        margin-bottom: var(--spacing-xxl) !important;
    }

    .nm-vh-md-100 {
        min-height: 100vh;
    }

    #logo-container {
        position: fixed;
    }
}

@media (min-width: 992px) {
    #page-content {
        padding: var(--spacing-xl) 8%;
    }

    .nm-tm-wr {
        max-width: 620px;
    }
}

@media (min-width: 1200px) {
    #page-content {
        padding: var(--spacing-xl) 10%;
    }

    .nm-tm-wr {
        max-width: 640px;
    }
}
