:root {
    --color-rojo: #A42D1D;
    --color-gris-nube: #F0ECEC;
}

/*** Sección de iniciar sesión ****/ 
#login-form .dialog {
  width: 465px;
  height: 482px;
  border-radius: 32px;
  background: #FFF;
  box-shadow: 0 4px 15.6px 9px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

/* Centrado logo y textos principales */
.textoCentro {
  text-align: center;
}

/* Título ¡HOLA! */
#login-form .dialog h2 {
  color: #000;
  font-family: 'Inter', sans-serif;
  font-size: 41px;
  font-weight: 500;
  font-style: normal;
  line-height: normal;
  margin: 0.25rem 0 0.5rem 0;
}

/* Subtítulo */
#login-form .dialog p:not(.error-ajax):not(.textoCentro) {
  width: 385px;
  height: 34px;
  color: #000;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  margin: 0 auto 1rem auto;
}

/* Para el p.subtitulo si quieres usar la clase */
#login-form .dialog p.textoCentro {
  margin-bottom: 1rem;
}

/* Error mensaje */
.error-ajax {
  color: red;
  text-align: center;
  margin-bottom: 1rem;
}

/* Contenedor controles */
.controles-formulario {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto; /* empuja hacia abajo el contenedor */
}

/* Cada grupo de label+input */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Labels */
.form-group label {
  color: #000;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
}

/* Inputs */
.form-group input {
  padding: 10px 11px;
  border-radius: 4px;
  border: 1px solid #E5DFDE;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  box-sizing: border-box;
  width: 100%;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-color: #A42D1D; /* color primario */
}

/* Mensaje error input */
.error-msg {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none; /* se muestra solo si hay error */
}

/* Botón iniciar sesión */
#login-form .controles-formulario > button.button {
  width: 132px;
  height: 39px;
  align-self: flex-end; /* Alinea a la derecha */
  display: inline-flex;
  padding: 10px 14px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: #A42D1D;
  border: none;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#login-form .controles-formulario > button.button:hover {
  background: #8b2517; /* un rojo más oscuro al hover */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*outline: 1px solid red;*/ /*esta madre ayuda a organizar, ves todos los bordesitos en rojo*/
}

html,
body {
    height: 100dvh;
    font-family: sans-serif;
    outline: none;
}

.layout {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100%;
    overflow-y: hidden;
}

main {
    overflow-y: hidden;
}

.contenido {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 250px 1fr;
}

.title {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    color: #363636;
    line-height: 1.125;
    word-break: break-word;
    margin-bottom: 1rem;
}

.title.is-3 {
    font-size: 1.75rem;
}

.subtitle {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    color: #4a4a4a;
    line-height: 1.5;
    word-break: break-word;
    margin-top: -0.75rem;
    margin-bottom: 1.5rem;
}

.subtitle.is-4 {
    font-size: 1.5rem;
}

.buttons {
    display: flex;
    gap: 0.5rem;
}

.buttons.columns {
    flex-direction: column;
}

.button {
    border: 1px solid var(--color-rojo);
    color: var(--color-rojo);
    background: white;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.button.has-text-white {
    background-color: var(--color-rojo);
    color: white;
}

.button.fullwidth {
    width: 100%;
    justify-content: center;
}

button:disabled {
    color: #888;
    cursor: not-allowed;
    opacity: 0.65;
}

.formulario-flotante.invisible {
    display: none;
}

.formulario-flotante .backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.formulario-flotante .dialog {
    background: white;
    border-radius: 8px;
    width: 50dvw;
    padding: 1rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    max-width: 100%;
}

.formulario-flotante .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formulario-flotante .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.formulario-flotante .body {
    margin-top: 0.5rem;
}

#signup-form .controles-formulario .flex-1 {
    display: flex;
    gap: 1rem;
}

#signup-form .controles-formulario .flex-1>* {
    flex: 1;
}

.formulario-flotante .footer {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.textoCentro {
    text-align: center;
}

@media (max-width: 768px) {
    .contenido {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
        width: 100%;
    }

    .button {
        width: 100%;
        justify-content: center;
    }

    .formulario-flotante .dialog {
        width: 90dvw !important;
    }
}