/* =====================
   VARIABLES
===================== */
:root {
    --verde_medio: #178369;
    --verde_claro: #3AB394;
    --verde_oscuro: #0B3827;
    --otro_verde: #145c44;;
    --bg-main: #f5f6f7;
    --bg-surface: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --font: "citrine-variable", sans-serif;
    --red-border: #dc2626;
    --yellow-warning: #FFA500;
}
/* =====================
   BODY
===================== */
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-main);
    font-family: var(--font);
    color: var(--text-main);

    display: flex;
    flex-direction: column;
    /* align-items: center;      */
    /* justify-content: center;   */
    overflow-x: hidden;       /* EVITAR SCROLL HORIZONTAL */
}

.logo-forms {
    margin-bottom: 32px;
    padding: 24px 48px;
    box-sizing: border-box;
}

.logo-forms img {
    height: 40px;
    width: auto;

}

.layout-forms {
    width: 100%;
    max-width: 1200px;
    padding: 32px 16px 64px;
    box-sizing: border-box;
    margin: 0 auto;
}


/* =====================
    FORM
===================== */

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    width: 100%;
    box-sizing: border-box;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: span 2;
}


.field label,
.field a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
}


/* =====================
   INPUTS
===================== */
.input {
    padding: 15px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 15px;
    color: var(--text-main);
    box-sizing: border-box;
    width: 100%;
}

.input::placeholder {
    color: var(--text-muted);
}

.input:focus {
    outline: 1px solid var(--verde_medio);
    border-color: var(--verde_medio);
}

/* Input error */
.input.is-invalid{
    border-color: var(--red-border);
}

.input.is-invalid:focus {
    outline: 1px solid var(--red-border); 
}

.phone-group {
    display: flex;
    gap: 8px;
}

.phone-group .input {
    flex: 1;
    min-width: 0;   /* MUY importante en flex */
}

/* Label error */
.field.is-invalid label {
    color: var(--red-border);
}

.field label.warning-message {
    color: var(--yellow-warning);
}

.input.select {
    appearance: none;
    background: url("../images/down.png") no-repeat right 14px center;
    background-size: 12px;
    padding-right: 36px;
}

.option {
    font-size: 15px;
    color: var(--text-main);
}

.select-input option[value=""] {
    color: var(--text-muted);
}

.input.textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
    /* padding: 0 12px 70px 0;  */
    padding-bottom: 80px;
    padding-left: 15px; 
    /* padding-bottom: 12px; */
}


/* =====================
   ACTION BUTTONS
===================== */
.buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cancel-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-main);
    background: transparent;
    cursor: pointer;
    border: none;
}

.cancel-btn:hover {
    text-decoration: underline;
    color: var(--verde_medio);
}

.next-btn {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    background: var(--verde_medio);
    border-radius: 6px;
    outline: none;
    border: none;
    cursor: pointer;
}

.next-btn:hover {
    background: var(--verde_claro);
}

.next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-error {
    color: #b42318;
    margin-bottom: 16px;
    font-size: 14px;
}

.form-error.hidden {
    display: none;
}

/* ===================
    SHOW DETAILS IN TERMS AND CONDITIONS      
   =================== */
.details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}


.details .modal-content {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: 14px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.details .close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-content .bottom-close {
    position: relative;
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background: var(--verde_medio);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.modal-content .bottom-close:hover {
    background: var(--verde_claro);
}

/* .details h2 {
    margin-top: 0;
} */

.details .modal-content h1 {
    color: var(--verde_medio);
    font-size: 2.0rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--verde_medio);
    padding-bottom: 0.3rem;
    text-align: left;
}

.details .modal-content h2 {
color: var(--verde_medio);
font-size: 1.4rem;
margin-top: 2rem;
margin-bottom: 1rem;
}

.details .modal-content strong {
font-weight: 400;
}

.details .modal-content p {
margin-bottom: 1rem;
font-size: 14px;
text-align: left;
}

.details .modal-content ul {
margin-left: 1.5rem;
margin-bottom: 1rem;
}

.details .modal-content li {
margin-bottom: 0.5rem;
font-size: 14px;
}

.details .modal-content ul {
    padding-left: 20px;
}

.details .modal-content a {
    color: var(--verde_medio);
    text-decoration: none;
}

.view-details {
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.view-details:hover {
    color: var(--verde_medio);
    text-decoration: underline;
}

/* HIDDEN */
.hidden {
    display: none;
}

.terms .checkbox label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}


/* =====================
   FORM CARDS
===================== */

.card {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 32px 32px 28px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 24px;
}

.card p {
    font-size: 14px;
    margin-top: 12px;
    text-align: center;

}

.card p.success-message {
    color: var(--verde_medio);
}

.card p.error-message {
    color: var(--red-border);
}

.card p.error-message.terms{
    text-align: left;
}

/* =====================
   INVITE USER
===================== */


/* FORM TEXT */

.form-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    text-align: left;
}

/* INFO BOX */
.info-box {
    background: var(--bg-main);
    border-left: 4px solid var(--verde_medio);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.info-box strong {
    font-size: 16px;
    color: var(--text-main);
}

.info-box p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: left;
}




/* =====================
   PASSWORD REQUIREMENTS
===================== */

.password-requirements {
    font-size: 0.9rem;
}

.password-requirements .valid {
    color: var(--verde_claro); 
    font-weight: 600;
}

.password-requirements .invalid {
    color: var(--text-muted); 
}

/* Evitar saltos de línea en ciertos elementos */

.no-wrap {
    white-space: nowrap;
}

.activation-text {
    font-size: 15px; /* o 16px si quieres más SaaS */
    color: var(--text-muted);
    margin-top: 0;   /* quita espacio extra */
    text-align: left; /* opcional */
    white-space: nowrap;
}


/* =====================
   Two Factor Authentication
===================== */

.backup-grid {
    display: flex;
    flex-wrap: wrap;          /* Permite que los códigos se muevan a otra línea si no caben */
    justify-content: center;  /* Centra horizontalmente */
    gap: 10px;                /* Espacio entre cada código */
    margin-top: 15px;
}

.backup-code {
    background-color: #f0f0f0; /* Un fondo gris claro para destacar */
    padding: 10px 20px;
    border-radius: 5px;
    font-family: monospace;    /* Que se vea tipo código */
    text-align: center;        /* Centra el texto dentro del div */
    min-width: 80px;           /* Ancho mínimo para uniformidad */
}

/* =====================
   Text Area
===================== */

textarea.input {
    font-family: inherit;
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.5;
    padding: 15px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    /* Hacer la grid de 2 columnas a 1 columna */
    .grid {
        grid-template-columns: 1fr;
    }

    /* Los field full ya ocupan 1 columna, pero aseguramos el width completo */
    .field.full {
        grid-column: 1 / -1;
    }

    /* Ajustes de padding de la card y layout */
    .card {
        padding: 16px 12px 18px;
    }
    .card .p{
        font-size: 12px;
    }

    .layout-forms {
        padding: 16px 12px 32px;
    }

    /* Ajustar botones y términos */
    .buttons {
        flex-direction: column;
        align-items: center;   /* centra horizontalmente */
        gap: 12px;
    }

    .next-btn {
        width: 100%;           /* botón principal ocupa todo */
        max-width: 400px;      /* opcional: límite elegante */
    }

    .cancel-btn {
        width: auto;           /* no ocupa todo */
        text-align: center;
    }

    /* Modal términos y condiciones */
    .details .modal-content {
        padding: 24px;
        width: 80%;
        max-width: 500px;
    }


    /* Ajustar títulos y spacing de secciones */
    .grid h3.field.full {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .field label {
        font-size: 13px;
    }
}



