/* ==========================================================================
   A-CONFIABLE — pantallas de acceso (login, recuperar contraseña)
   ========================================================================== */

body {
    background: #f3eef0;
}

.ac-login {
    --brand: #652d38;
    --brand-dark: #3f1a22;
    --brand-soft: rgba(101, 45, 56, .08);
    --ink: #2b2b33;
    --muted: #7a7a86;
    --line: #e4e0e2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(1200px 600px at 0% 0%, rgba(101, 45, 56, .10), transparent 60%),
        radial-gradient(900px 500px at 100% 100%, rgba(101, 45, 56, .08), transparent 60%),
        #f3eef0;
}

.ac-login-card {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1.5rem 3.5rem rgba(63, 26, 34, .18), 0 .25rem .75rem rgba(63, 26, 34, .06);
}

/* ---------- Panel de marca ---------- */
.ac-login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2.5rem;
    color: #fff;
    background: linear-gradient(155deg, #7a3644 0%, var(--brand) 45%, var(--brand-dark) 100%);
    overflow: hidden;
}

.ac-login-brand::before,
.ac-login-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
}

.ac-login-brand::before {
    width: 520px;
    height: 520px;
    top: -220px;
    right: -240px;
}

.ac-login-brand::after {
    width: 380px;
    height: 380px;
    bottom: -200px;
    left: -160px;
}

.ac-login-logo {
    position: relative;
    z-index: 1;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .12), 0 1rem 2rem rgba(0, 0, 0, .25);
    margin-bottom: 1.75rem;
    overflow: hidden; /* el PNG es cuadrado con fondo blanco: recortar las esquinas */
}

.ac-login-logo img {
    width: 84%;
    height: 84%;
    object-fit: contain;
    border-radius: 50%;
}

.ac-login-brand h2 {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: .02em;
    margin: 0 0 .35rem;
    color: #fff;
}

.ac-login-brand .ac-tagline {
    position: relative;
    z-index: 1;
    font-size: .95rem;
    color: rgba(255, 255, 255, .8);
    max-width: 300px;
    margin: 0 auto;
}

.ac-login-features {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    text-align: left;
    font-size: .88rem;
    color: rgba(255, 255, 255, .88);
}

.ac-login-features li {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .6rem;
}

.ac-login-features i {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    font-size: .8rem;
}

/* ---------- Formulario ---------- */
.ac-login-form {
    padding: 3rem 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ac-login-form h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 .3rem;
}

.ac-login-form .ac-sub {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 2rem;
}

.ac-field {
    margin-bottom: 1.15rem;
}

.ac-field label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: .4rem;
}

.ac-input {
    position: relative;
}

.ac-input > i.ac-ico {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a7a3a6;
    font-size: .95rem;
    pointer-events: none;
}

.ac-input .form-control {
    height: 3.1rem;
    padding-left: 2.75rem;
    padding-right: 1rem;
    border: 1.5px solid var(--line);
    border-radius: .7rem;
    font-size: 1rem;
    color: var(--ink);
    background: #fbfafb;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.ac-input .form-control:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 .2rem var(--brand-soft);
}

.ac-input .form-control:focus + .ac-ico,
.ac-input:focus-within > i.ac-ico {
    color: var(--brand);
}

.ac-input.has-toggle .form-control {
    padding-right: 3rem;
}

.ac-toggle-pass {
    position: absolute;
    right: .35rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #a7a3a6;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .5rem;
    cursor: pointer;
}

.ac-toggle-pass:hover,
.ac-toggle-pass:focus {
    color: var(--brand);
    outline: none;
    background: var(--brand-soft);
}

.ac-field .ac-error {
    display: block;
    color: #c0392b;
    font-size: .8rem;
    margin-top: .35rem;
}

.ac-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin: .25rem 0 1.25rem;
    font-size: .88rem;
}

.ac-row .custom-control-label {
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
}

.ac-row .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--brand);
    border-color: var(--brand);
}

.ac-link {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.ac-link:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

.ac-captcha {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    min-height: 78px;
}

.ac-btn-login {
    width: 100%;
    height: 3.15rem;
    border: 0;
    border-radius: .7rem;
    background: linear-gradient(135deg, #7a3644, var(--brand));
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .02em;
    box-shadow: 0 .6rem 1.25rem rgba(101, 45, 56, .28);
    transition: transform .1s, box-shadow .15s, opacity .15s;
}

.ac-btn-login:hover {
    box-shadow: 0 .8rem 1.5rem rgba(101, 45, 56, .35);
}

.ac-btn-login:active {
    transform: translateY(1px);
}

.ac-btn-login[disabled] {
    opacity: .75;
    cursor: wait;
}

.ac-secure {
    margin-top: 1.5rem;
    text-align: center;
    font-size: .78rem;
    color: var(--muted);
}

.ac-secure i {
    color: #3c9a6b;
    margin-right: .3rem;
}

.ac-login-footer {
    text-align: center;
    font-size: .75rem;
    color: var(--muted);
    margin-top: 1.25rem;
}

/* ---------- Tablet / teléfono ---------- */
@media (max-width: 860px) {
    .ac-login {
        display: block;
        padding: 0;
        background: #fff;
    }

    .ac-login-card {
        grid-template-columns: 1fr;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        min-height: 100dvh;
        max-width: none;
    }

    .ac-login-brand {
        padding: 2.25rem 1.5rem 3.25rem;
        border-radius: 0 0 1.75rem 1.75rem;
    }

    .ac-login-logo {
        width: 104px;
        height: 104px;
        margin-bottom: 1rem;
        box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 .5rem 1rem rgba(0, 0, 0, .25);
    }

    .ac-login-brand h2 {
        font-size: 1.5rem;
    }

    .ac-login-brand .ac-tagline {
        font-size: .85rem;
    }

    .ac-login-features {
        display: none;
    }

    .ac-login-form {
        position: relative;
        margin: -1.75rem 1rem 1.5rem;
        padding: 1.75rem 1.25rem 1.5rem;
        background: #fff;
        border-radius: 1.1rem;
        box-shadow: 0 .75rem 2rem rgba(63, 26, 34, .12);
        justify-content: flex-start;
    }

    .ac-login-form h1 {
        font-size: 1.35rem;
    }

    .ac-login-form .ac-sub {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 359.98px) {
    .ac-captcha .g-recaptcha {
        transform: scale(.86);
        transform-origin: center top;
    }
}

/* ---------- Recuperar contraseña ---------- */
.ac-icon-badge {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.3rem;
    margin-bottom: 1.1rem;
}

.ac-note {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    background: #f8f5f6;
    border: 1px solid var(--line);
    border-radius: .7rem;
    padding: .8rem .9rem;
    font-size: .84rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.ac-note i {
    color: var(--brand);
    margin-top: .15rem;
}

.ac-back {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1.5rem;
    justify-content: center;
    width: 100%;
    font-size: .9rem;
}
