/* ---------------------------------------------
   VARIABLES Y ESTILOS GENERALES (PROFESIONAL)
   --------------------------------------------- */
:root {
    --color-primario: #1a1a1a;   /* Negro profundo y suave */
    --color-secundario: #b8a78b; /* Dorado/beige metálico */
    --color-agua: #0077be;       /* Azul para agua (solo para acentos) */
    --color-gas: #505050;        /* Gris metalizado para gas (solo para acentos) */
    --color-calor: #ff6b35;      /* Naranja/rojo para calor (solo para acentos) */
    --color-blanco: #ffffff;
    --color-texto: #e0e0e0;
    --color-acento: #d4c4a5;
    --color-superficie: #252525; /* Un gris muy oscuro para superficies */
    --border-radius: 12px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(145deg, var(--color-primario) 0%, #222 100%);
    color: var(--color-texto);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Fondo sutil y profesional, sin colores */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}

/* Eliminados los elementos decorativos de tuberías */

/* ---------------------------------------------
   ESTILOS DEL HEADER (LIMPIO Y PROFESIONAL)
   --------------------------------------------- */
header {
    background: linear-gradient(145deg, var(--color-superficie), #1f1f1f);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Eliminado el elemento decorativo de tubería en el header */

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(184, 167, 139, 0.2);
}

.logo-container img:hover {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-secundario);
    margin: 0;
    line-height: 1.2;
}

.tagline {
    font-size: 0.7rem;
    color: var(--color-texto);
    opacity: 0.7;
    margin-top: 2px;
}

.btn-home {
    text-decoration: none;
    color: var(--color-blanco);
    background: linear-gradient(145deg, var(--color-secundario), var(--color-acento));
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(184, 167, 139, 0.2);
    font-size: 0.9rem;
}

.btn-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(184, 167, 139, 0.4);
}

/* ---------------------------------------------
   ESTILOS DEL CONTENIDO PRINCIPAL (LOGIN MEJORADO)
   --------------------------------------------- */
main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

.login-container {
    background: linear-gradient(145deg, var(--color-superficie), #1f1f1f);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
}

/* Eliminado el borde decorativo que simula tubería */

.pipe-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.pipe-icon svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(0, 119, 190, 0.3));
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-container h2 {
    margin-bottom: 1.5rem;
    color: var(--color-secundario);
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
}

/* Eliminado el subrayado de colores */

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-texto);
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 0.9rem 0.9rem 3rem;
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--color-blanco);
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: #777;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-secundario);
    box-shadow: 0 0 8px rgba(184, 167, 139, 0.3);
    background-color: rgba(30, 30, 30, 0.9);
}

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    color: #888;
}

.password-wrapper .input-icon {
    left: 1rem;
}

/* Contenedor para ubicar el ojo dentro del input */
.toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-pass svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-secundario);
    transition: opacity 0.2s ease;
}

.toggle-pass:hover svg {
    opacity: 0.7;
}

button[type="submit"] {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(145deg, var(--color-secundario), var(--color-acento));
    color: var(--color-primario);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(184, 167, 139, 0.4);
}

/* ---------------------------------------------
   ESTILOS DEL FOOTER
   --------------------------------------------- */
footer {
    background: var(--color-primario);
    text-align: center;
    padding: 1.5rem;
    color: var(--color-secundario);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    margin: 1rem;
    border-radius: var(--border-radius);
}

/* Eliminado el elemento decorativo de tuberías en el footer */

/* ---------------------------------------------
   RESPONSIVIDAD PARA DISPOSITIVOS MÓVILES
   --------------------------------------------- */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
        margin: 0.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .logo-container {
        gap: 8px;
    }

    .logo-container img {
        width: 40px;
        height: 40px;
    }

    .logo-container h1 {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 0.65rem;
    }

    .btn-home {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .login-container {
        padding: 2rem;
        margin: 0.5rem;
    }

    .pipe-decoration {
        display: none;
    }
}

/* ---------------------------------------------
   ESTILOS DEL LOADER
   --------------------------------------------- */
.loader {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(184, 167, 139, 0.3);
    border-top: 4px solid var(--color-secundario);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}