/* Multiservicio KRAJ — Inicio de sesión público */
body:has(.auth-card) {
    background: #F9FAFB;
}

body:has(.auth-card) #contenido-principal {
    box-sizing: border-box;
    display: flex;
    min-height: calc(100vh - 150px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem;
}

/* Tarjeta de acceso */
body:has(.auth-card) .auth-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    border: 1px solid #F0E1E6;
    border-radius: 0.875rem;
    background: #FFFFFF;
    box-shadow:
        0 1px 2px rgb(17 17 17 / 4%),
        0 8px 24px rgb(17 17 17 / 6%);
}

/* Encabezado del formulario */
body:has(.auth-card) .auth-eyebrow {
    margin: 0 0 0.625rem;
    color: #A3446D;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

body:has(.auth-card) .auth-title {
    margin: 0;
    color: #111111;
    font-size: 1.75rem;
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.25;
    text-align: center;
}

body:has(.auth-card) .auth-description {
    margin: 0.75rem 0 1.75rem;
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: center;
}

/* Campos */
body:has(.auth-card) .form-group {
    margin-bottom: 1.25rem;
}

body:has(.auth-card) .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #111111;
    font-size: 0.875rem;
    font-weight: 600;
}

body:has(.auth-card) .form-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 0.875rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    outline: none;
    background: #FFFFFF;
    color: #111111;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

body:has(.auth-card) .form-control:hover {
    border-color: #D4AF70;
}

body:has(.auth-card) .form-control:focus {
    border-color: #D4AF70;
    box-shadow: 0 0 0 3px rgb(212 175 112 / 22%);
}

/* Recordarme y recuperar contraseña */
body:has(.auth-card) .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.25rem 0 1.5rem;
}

body:has(.auth-card) .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4B5563;
    font-size: 0.8125rem;
    cursor: pointer;
}

body:has(.auth-card) .checkbox-label input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #D4AF70;
    cursor: pointer;
}

body:has(.auth-card) .text-link {
    color: #A3446D;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}

body:has(.auth-card) .text-link:hover {
    color: #803454;
    text-decoration: underline;
}

/* Botón principal */
body:has(.auth-card) .btn-primary {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-height: 2.875rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid #C49B54;
    border-radius: 0.5rem;
    background: #D4AF70;
    color: #111111;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

body:has(.auth-card) .btn-primary:hover {
    border-color: #B58D46;
    background: #C49B54;
}

body:has(.auth-card) .btn-primary:active {
    transform: translateY(1px);
}

body:has(.auth-card) .btn-primary:focus-visible {
    outline: 3px solid rgb(212 175 112 / 40%);
    outline-offset: 3px;
}

/* Registro */
body:has(.auth-card) .auth-bottom {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #F3E8EC;
    color: #6B7280;
    font-size: 0.8125rem;
    line-height: 1.6;
    text-align: center;
}

/* Mensajes de validación del login */
body:has(.auth-card) #contenido-principal > .kraj-alert {
    box-sizing: border-box;
    width: 100%;
    max-width: 28rem;
    margin: 0 0 1rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

body:has(.auth-card) #contenido-principal > .kraj-alert-success {
    border: 1px solid #A7F3D0;
    background: #ECFDF5;
    color: #065F46;
}

body:has(.auth-card) #contenido-principal > .kraj-alert-error {
    border: 1px solid #FECACA;
    background: #FEF2F2;
    color: #991B1B;
}

body:has(.auth-card) #contenido-principal > .kraj-alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

/* Móviles */
@media (max-width: 640px) {
    body:has(.auth-card) #contenido-principal {
        min-height: calc(100vh - 120px);
        padding: 2rem 1rem;
    }

    body:has(.auth-card) .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 0.75rem;
    }

    body:has(.auth-card) .auth-title {
        font-size: 1.5rem;
    }

    body:has(.auth-card) .form-row {
        align-items: flex-start;
    }
}
