﻿/* ===============================
   RESET Y FUENTE
=============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

/* ===============================
   FONDO Y CENTRADO
=============================== */
body {
    background: url('/images/login.webp') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* ===============================
   CONTENEDORES
=============================== */

/* Formulario Agregar/Editar Perfil / Register */
form.register-container {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    max-width: 800px; /* ancho máximo */
    color: white;
    margin: 2rem auto;
}

    form.register-container h2 {
        text-align: center;
        margin-bottom: 2rem;
        color: white;
    }

/* Formulario Login (opcional si tenés login) */
.login-container {
    background-color: rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    color: white;
}

    .login-container h2 {
        text-align: center;
        margin-bottom: 1.5rem;
        color: white;
    }

/* ===============================
   COLUMNAS PERFIL / REGISTER
=============================== */
.form-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.form-left {
    flex: 1;
    min-width: 250px;
}

.form-right {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

    .form-right .image-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%; /* NO tocar esto */
        background-color: rgba(0, 0, 0, 0.5); /* fondo más oscuro */
        border-radius: 20px;
        overflow: hidden;
    }
        /* Cuando haya imagen, quita el fondo */
        .form-right .image-container.has-image {
            background-color: transparent;
        }

#imagePreview {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    object-fit: contain;
}

/* ===============================
   LABELS E INPUTS
=============================== */
.form-group {
    margin-bottom: 1.2rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 500;
}

/* Inputs tipo Glass para perfiles/register */
input.glass-input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.6);
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    input.glass-input::placeholder {
        color: rgba(255,255,255,0.6);
    }

    input.glass-input:hover {
        background: rgba(255,255,255,0.12);
    }

    input.glass-input:focus {
        outline: none;
        background: rgba(255,255,255,0.18);
        border: 1.5px solid #fff;
        box-shadow: 0 0 20px rgba(255,255,255,0.25);
        transform: scale(1.02);
    }

/* Inputs login estándar */
.login-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    background-color: #fff;
}

    .login-container input:focus {
        border-color: #457b9d;
        outline: none;
    }

/* ===============================
   MENSAJES
=============================== */
.text-danger {
    color: #ff6b6b;
    font-size: 0.85rem;
}

.alert {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

/* ===============================
   BOTONES
=============================== */
.btn-group,
.btn-group-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-group-login {
    justify-content: space-between;
}

    .btn-group-login .btn {
        width: 48%;
    }

.btn-primary, .btn-secondary {
    border: 2px solid white !important;
    border-radius: 25px;
    font-weight: 500;
    background-color: transparent !important;
    color: white;
    padding: 0.8rem 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-primary:hover {
        background-color: #0056b3 !important;
        color: white !important;
        border-color: white !important;
    }

    .btn-secondary:hover {
        background-color: #999 !important;
        color: white !important;
        border-color: white !important;
    }

    .btn-primary i, .btn-secondary i {
        transition: transform 0.3s ease;
    }

    .btn-primary:hover i, .btn-secondary:hover i {
        transform: scale(1.3);
        color: white !important;
    }

    .btn-primary:active, .btn-secondary:active {
        animation: bounce 0.2s;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

/* Botón de link register (en login) */
.btn-register {
    margin-top: 1.5rem;
    width: 100%;
    font-weight: 600;
    text-decoration: none;
    color: white;
    display: inline-block;
    text-align: center;
}

    .btn-register:hover {
        text-decoration: underline;
        color: #457b9d;
    }

/* ===============================
   OTROS
=============================== */
.footer-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #ccc;
}

#togglePassword {
    position: absolute;
    top: 55%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    margin-top: 11px;
}

/* ===============================
   RESPONSIVE
=============================== */
@media (max-width: 700px) {
    .form-columns {
        flex-direction: column;
    }

    .form-right .image-container {
        height: auto;
    }

    #imagePreview {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

/* Formulario compacto de una sola columna */
.form-single-column {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
