body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
}

.comentarios-main {
    margin: 0 auto;
    padding: 24px;
    width: 98%;
}

.barra-preguntas-ciudadanas {
    margin-top: 10px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 12px 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px #eee;
}

.barra-preguntas-ciudadanas h2 {
    margin: 0 auto 0 0;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    color: #222;
    flex: 1;
}

.btn-volver-pregunta {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1em;
    padding: 8px 18px;
    transition: box-shadow 0.2s, background 0.2s, padding 0.2s;
    outline: none;
    color: #222;
}

.btn-volver-pregunta:hover,
.btn-volver-pregunta:focus {
    background: #f0a4a4;
    border: 1px solid #a19e9e;
    box-shadow: 0 2px 8px #c5c5c5;
    padding-left: 23px;
    padding-right: 23px;
}

.login-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pregunta-card.login-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px #eee;
    padding: 18px 20px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    cursor: default;
}

.login-card-cabecera {
    margin-bottom: 12px;
}

.login-card-cabecera h1 {
    margin: 0 0 8px;
    font-size: 1.8em;
    color: #222;
}

.login-card-cabecera p {
    margin: 0;
    color: #666;
}

.login-estado-existente {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #b9d7bc;
    border-radius: 6px;
    background: #edf8ef;
    color: #1f5130;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.campo-formulario {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo-formulario label {
    font-weight: 700;
    color: #333;
}

.campo-formulario input {
    width: 100%;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.campo-formulario input:focus {
    outline: none;
    border-color: #dd1515;
    box-shadow: 0 0 0 3px rgba(221, 21, 21, 0.12);
}

.campo-password {
    position: relative;
}

.campo-password input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.toggle-password:hover,
.toggle-password:focus {
    background: #f2f2f2;
    outline: none;
}

.mensaje-login {
    min-height: 18px;
    padding: 0;
    color: #b42318;
    font-weight: 700;
}

.mensaje-login.visible {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #f0b3ae;
    background: #fef3f2;
}

.mensaje-login.visible.ok {
    color: #1f5130;
    border-color: #b9d7bc;
    background: #edf8ef;
}

.acciones-login {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.acciones-login-superiores {
    margin-bottom: 12px;
    justify-content: flex-start;
}

.btn-guardar-respuesta,
.btn-secundario {
    border: none;
    border-radius: 4px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 1em;
}

.btn-guardar-respuesta {
    background: #dd1515;
    color: #fff;
}

.btn-guardar-respuesta:hover,
.btn-guardar-respuesta:focus {
    background: #a01111;
    outline: none;
}

.btn-secundario {
    background: #ececec;
    color: #333;
    border: 1px solid #cfcfcf;
}

.btn-secundario:hover,
.btn-secundario:focus {
    background: #dddddd;
    outline: none;
}

.enlace-boton {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.campo-formulario.error input {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.login-registro-enlace {
    margin-top: 14px;
    text-align: center;
    color: #0d0d0d;
}

.login-recuperacion-enlace {
    margin-top: 12px;
    text-align: center;
}

.login-recuperacion-enlace a {
    color: #555;
    font-weight: 700;
    text-decoration: none;
}

.login-recuperacion-enlace a:hover,
.login-recuperacion-enlace a:focus {
    color: #dd1515;
    text-decoration: underline;
}

.login-registro-enlace a {
    color: #dd1515;
    font-weight: 700;
    text-decoration: none;
}

.login-registro-enlace a:hover,
.login-registro-enlace a:focus {
    color: #a01111;
    text-decoration: underline;
}

.login-sin-animaciones .btn-volver-pregunta,
.login-sin-animaciones .campo-formulario input,
.login-sin-animaciones .toggle-password,
.login-sin-animaciones .social-icon,
.login-sin-animaciones .header-right a:focus,
.login-sin-animaciones .contact-item,
.login-sin-animaciones .contact-item a,
.login-sin-animaciones .useful-links a,
.login-sin-animaciones .footer-social-links a,
.login-sin-animaciones .footer-bottom a {
    transition: none !important;
    animation: none !important;
}

.login-sin-animaciones .btn-volver-pregunta:hover,
.login-sin-animaciones .btn-volver-pregunta:focus {
    padding-left: 18px;
    padding-right: 18px;
}

.login-sin-animaciones .social-icon:hover,
.login-sin-animaciones .contact-item:hover,
.login-sin-animaciones .useful-links a:hover,
.login-sin-animaciones .footer-social-links a:hover {
    transform: none !important;
}

@media (max-width: 670px) {
    .barra-preguntas-ciudadanas {
        flex-direction: column;
        align-items: center;
        padding: 12px 8px 12px 8px;
        gap: 10px;
        text-align: center;
    }

    .barra-preguntas-ciudadanas h2 {
        margin: 0;
        text-align: center;
        font-size: 1.2em;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .btn-volver-pregunta {
        justify-content: center;
        width: 100%;
        margin-bottom: 8px;
    }

    .espaciador-barra {
        display: none;
    }

    .pregunta-card.login-card {
        padding: 18px;
    }

    .acciones-login {
        flex-direction: column;
    }

    .btn-guardar-respuesta,
    .btn-secundario {
        width: 100%;
    }
}