/* WhiteLogin 1.0.0 - White Solutions */

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: #f4f6fa;
    color: #1d2533;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wl-root {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- panel de marca ---------- */
.wl-brand {
    position: relative;
    flex: 0 0 42%;
    max-width: 640px;
    color: #fff;
    background-color: var(--wl-color1);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.wl-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, var(--wl-color1) 0%, var(--wl-color2) 100%);
    opacity: var(--wl-overlay);
}

.wl-brand-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 48px 48px 32px;
}

.wl-logo img {
    display: block;
    max-width: 260px;
    max-height: 120px;
    object-fit: contain;
}

.wl-logo-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.wl-tagline {
    margin: 24px 0 0;
    max-width: 380px;
    font-size: 1.15rem;
    line-height: 1.45;
    opacity: 0.9;
}

.wl-brand-footer {
    margin-top: auto;
    font-size: 0.85rem;
    opacity: 0.85;
}

.wl-footer-html a {
    color: #fff;
}

/* ---------- columna del formulario ---------- */
.wl-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.wl-card {
    width: 100%;
    max-width: 420px;
}

.wl-title {
    margin: 0 0 4px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wl-subtitle {
    margin: 0 0 24px;
    color: #5b6576;
}

.wl-field {
    margin-bottom: 14px;
}

.wl-form .form-label {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.wl-root .input-group-text,
.wl-modal .input-group-text {
    background: #fff;
    color: #6b7585;
}

.wl-root .form-control,
.wl-modal .form-control {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.wl-root .form-control:focus,
.wl-modal .form-control:focus {
    border-color: var(--wl-color2);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--wl-color2) 22%, transparent);
}

/* el ojo */
.wl-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-left: 0;
    background: #fff;
    color: #6b7585;
}

.wl-eye:hover,
.wl-eye:focus-visible {
    color: var(--wl-color2);
    background: #f7f9fc;
}

.wl-eye .wl-eye-closed {
    display: none;
}

.wl-eye[aria-pressed="true"] .wl-eye-open {
    display: none;
}

.wl-eye[aria-pressed="true"] .wl-eye-closed {
    display: inline;
}

/* aviso de Bloq Mayús */
.wl-caps {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fff4d6;
    color: #7a5300;
    font-size: 0.875rem;
    font-weight: 600;
}

.wl-caps[hidden] {
    display: none;
}

.wl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 18px;
}

.wl-forgot {
    padding: 0;
    font-size: 0.9rem;
    color: var(--wl-color2);
}

.wl-submit {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--wl-color2);
    border-color: var(--wl-color2);
}

.wl-submit:hover,
.wl-submit:focus-visible {
    color: #fff;
    background: var(--wl-color1);
    border-color: var(--wl-color1);
}

.wl-submit:disabled {
    color: #fff;
    background: var(--wl-color2);
    opacity: 0.7;
}

.wl-back {
    color: #5b6576;
}

.wl-code {
    font-size: 1.4rem;
    letter-spacing: 0.3em;
    text-align: center;
}

.wl-notice {
    margin-bottom: 20px;
}

.wl-messages .alert {
    margin-bottom: 16px;
}

/* soporte */
.wl-support {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e3e7ee;
    font-size: 0.9rem;
    color: #5b6576;
}

.wl-support-title {
    margin-bottom: 6px;
    font-weight: 600;
}

.wl-support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.wl-support-links a {
    color: var(--wl-color2);
    text-decoration: none;
}

.wl-support-links a:hover {
    text-decoration: underline;
}

/* ---------- modo TPV: todo más grande para pantallas táctiles ---------- */
.wl-tpv .wl-card {
    max-width: 520px;
}

.wl-tpv .wl-title {
    font-size: 2.2rem;
}

.wl-tpv .form-control,
.wl-tpv .input-group-text {
    font-size: 1.35rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.wl-tpv .wl-eye {
    min-width: 68px;
}

.wl-tpv .wl-eye svg {
    width: 30px;
    height: 30px;
}

.wl-tpv .form-check-input {
    width: 1.6em;
    height: 1.6em;
}

.wl-tpv .form-check-label {
    font-size: 1.15rem;
    padding-left: 6px;
    padding-top: 4px;
}

.wl-tpv .wl-submit {
    font-size: 1.4rem;
    padding: 1.1rem 1rem;
}

/* ---------- móvil y tablet vertical: la marca pasa a cabecera ---------- */
@media (max-width: 767.98px) {
    .wl-root {
        flex-direction: column;
    }

    .wl-brand {
        flex: 0 0 auto;
        max-width: none;
    }

    .wl-brand-inner {
        padding: 22px 20px;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    .wl-logo img {
        max-width: 180px;
        max-height: 56px;
    }

    .wl-logo-text {
        font-size: 1.4rem;
    }

    .wl-tagline {
        margin: 0;
        font-size: 0.95rem;
        flex-basis: 100%;
    }

    .wl-brand-footer {
        display: none;
    }

    .wl-main {
        align-items: flex-start;
        padding: 24px 16px 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
