/* ===============================
   IMPORTS + RESET
================================ */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
    --gold: #FFC400;
    --gold-dark: #D4A200;

    --dark: #0B0B0B;
    --dark-2: #141414;
    --dark-3: #1E1E1E;

    --white: #ffffff;
    --gray: #bdbdbd;
    --gray-dark: #777;

    --shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
    --shadow-soft: 0 12px 25px rgba(0, 0, 0, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(0,0,0,0.88), rgba(0,0,0,0.92)),
        url('{{ url_for("static", filename="images/wallpaper.jpg") }}') center/cover no-repeat;

    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 20px;
}

/* ===============================
   HEADER
================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 12px 35px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.navbar .logo img {
    width: 70px;
    transition: 0.3s ease;
}

.navbar .logo h2 {
    color: var(--white);
    font-weight: 800;
    font-size: 1.55rem;
    letter-spacing: 0.8px;
}

.navbar .logo h2 span {
    color: var(--gold);
}

/* ===============================
   POPUP FORM
================================ */
.form-popup {
    position: relative;
    width: 100%;
    max-width: 880px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);

    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    
    margin-top: 70px;

    transform: translateY(30px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.45s ease;

    z-index: 200; 
}


.form-popup.show-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0px) scale(1);
}

.form-box {
    display: flex;
    min-height: 490px;
}

/* ===============================
   PANEL IZQUIERDO (NEGRO CON DETALLES ORO)
================================ */
.form-details {
    flex: 1;
    position: relative;
    padding: 55px 45px;
    background: linear-gradient(135deg, rgba(0,0,0,0.95), rgba(20,20,20,0.95));
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.form-details::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 196, 0, 0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.05), transparent 55%);
    pointer-events: none;
}

.form-details h2 {
    font-size: 2.15rem;
    font-weight: 900;
    z-index: 2;
    color: var(--white);
    letter-spacing: 0.5px;
}

.form-details h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: var(--gold);
    border-radius: 50px;
    margin-top: 12px;
    box-shadow: 0 0 12px rgba(255, 196, 0, 0.55);
}

.form-details p {
    font-size: 1.05rem;
    line-height: 1.75;
    font-weight: 600;
    color: rgba(255,255,255,0.82);
    z-index: 2;
}

.form-details ul {
    margin-top: 12px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 2;
}

.form-details ul li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
}

.form-details ul li::before {
    content: "✔";
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 900;

    background: rgba(255, 196, 0, 0.15);
    border: 1px solid rgba(255, 196, 0, 0.55);
    color: var(--gold);

    box-shadow: 0 0 18px rgba(255, 196, 0, 0.15);
}

/* ===============================
   PANEL DERECHO (BLANCO LIMPIO)
================================ */
.form-content {
    flex: 1;
    padding: 55px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;

    background: rgba(255,255,255,0.97);
}

.form-content h2 {
    text-align: center;
    margin-bottom: 30px;

    /* 👇 TEXTO NEGRO MÁS GRANDE */
    font-size: 2.1rem;
    font-weight: 900;

    color: var(--dark);
    letter-spacing: 0.4px;
}

/* ===============================
   INPUTS
================================ */
.input-field {
    position: relative;
    margin-bottom: 22px;
}

.input-field input {
    width: 100%;
    padding: 17px 15px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.18);
    background: rgba(250,250,250,0.98);
    font-size: 1rem;
    outline: none;
    transition: 0.25s;
    color: var(--dark);
    font-weight: 700;
}

.input-field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 196, 0, 0.25);
}

.input-field label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.97);
    padding: 0 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-dark);
    pointer-events: none;
    transition: 0.25s;
}

.input-field input:focus ~ label,
.input-field input:valid ~ label {
    top: -11px;
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--gold-dark);
}

/* ===============================
   BOTÓN
================================ */
form button {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;

    background: linear-gradient(135deg, var(--dark), var(--dark-2));
    color: var(--gold);

    font-weight: 900;
    font-size: 1.05rem;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: var(--shadow-soft);
    letter-spacing: 0.5px;
}

form button:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* ===============================
   LINK ABAJO (MÁS LINDO)
================================ */
.bottom-link {
    margin-top: 25px;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(0,0,0,0.75);
    font-weight: 700;
}

.bottom-link a {
    display: inline-block;
    margin-top: 10px;

    padding: 12px 20px;
    border-radius: 14px;

    background: rgba(0,0,0,0.08);
    color: var(--dark);
    font-weight: 900;
    text-decoration: none;

    border: 1px solid rgba(0,0,0,0.15);
    transition: 0.25s ease;
}

.bottom-link a:hover {
    background: rgba(255, 196, 0, 0.18);
    border: 1px solid rgba(255, 196, 0, 0.55);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ===============================
   CLOSE BUTTON
================================ */
.close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    cursor: pointer;
    color: rgba(0,0,0,0.7);
    transition: 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 196, 0, 0.2);
    color: var(--dark);
    transform: rotate(90deg);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
    .form-box {
        flex-direction: column;
    }

    .form-details {
        display: none;
    }

    .form-content {
        padding: 45px 30px;
    }

    .form-popup {
        margin-top: 90px;
    }
}


form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===============================
   PASSWORD FIELD + ICON (MEJORADO)
================================ */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 52px !important; /* espacio real para el ojo */
}

/* ICONO OJO */
.password-field .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;

    font-size: 1.55rem;
    color: rgba(0,0,0,0.55);
    transition: 0.25s ease;
    user-select: none;

    width: 38px;
    height: 38px;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.password-field .toggle-password:hover {
    background: rgba(255, 196, 0, 0.18);
    color: var(--gold-dark);
    transform: translateY(-50%) scale(1.07);
}

/* ===============================
   LABEL MEJOR POSICIONADO
================================ */
.password-field label {
    left: 16px !important;
    padding: 0 8px !important;
}

/* Cuando se sube el label */
.password-field input:focus ~ label,
.password-field input:valid ~ label {
    top: -13px !important;
    font-size: 0.78rem;
    font-weight: 900;
}

/* ===============================
   SEPARACIÓN ENTRE INPUTS
================================ */
#form-nueva-pass .input-field {
    margin-bottom: 26px;
}

/* ===============================
   TEXTO AYUDA MÁS BONITO
================================ */
.pass-help {
    font-size: 0.92rem;
    font-weight: 800;
    color: rgba(0,0,0,0.65);
    margin-top: -6px;
    margin-bottom: 22px;
    text-align: center;
    line-height: 1.55;
    padding: 10px 14px;
    border-radius: 14px;

    background: rgba(255, 196, 0, 0.15);
    border: 1px solid rgba(255, 196, 0, 0.40);
}

/* ===============================
   VALID INPUT STATES (MÁS PRO)
================================ */
.input-field input.valid {
    border: 2px solid #2a9d8f !important;
    box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.20) !important;
}

.input-field input.invalid {
    border: 2px solid #e63946 !important;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.15) !important;
}
