/**
 * Framework Tecno
 * Login / MFA — split layout moderno, sobrio, azul ERP.
 */

:root {
    --auth-bg: #f4f6fb;
    --auth-surface: #ffffff;
    --auth-ink: #1e293b;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-accent: #1b55e2;
    --auth-accent-soft: rgba(27, 85, 226, 0.12);
    --auth-panel: #0b1224;
    --auth-radius: 12px;
    --auth-field-h: 48px;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow: auto;
    background: var(--auth-bg);
    color: var(--auth-ink);
}

.form-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.form-form {
    width: 48%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--auth-surface);
}

.form-form .form-form-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2.5rem 1.75rem;
    box-sizing: border-box;
}

.form-form .form-form-wrap .form-container {
    width: 100%;
    min-height: auto;
    padding: 0;
    display: block;
}

.form-form .form-content {
    display: block;
    width: 100%;
    animation: auth-form-in 0.45s ease both;
}

/* --- Marca --- */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-brand-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(27, 85, 226, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-brand-mark img {
    display: block;
    width: 40px;
    height: 40px;
}

.auth-brand:hover .auth-brand-mark {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(27, 85, 226, 0.3);
}

.auth-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--auth-ink);
    line-height: 1.2;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--auth-ink);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.auth-title .brand-name,
.form-form .form-form-wrap h1 .brand-name {
    color: var(--auth-accent);
    font-weight: 700;
}

.auth-lead,
.form-form .form-form-wrap p.signup-link,
.form-form .form-form-wrap .text-muted.user-mfa-subtitle {
    font-size: 0.95rem;
    color: var(--auth-muted);
    font-weight: 500;
    margin: 0 0 1.75rem;
    line-height: 1.5;
    max-width: 36rem;
}

.auth-lead small,
.user-mfa-subtitle small {
    color: var(--auth-muted);
}

/* --- Campos --- */
.auth-label,
.form-form .auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 0.4rem;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
}

.form-form .form-form-wrap form .field-wrapper.input {
    position: relative;
    padding: 0 0 1.15rem;
    border-bottom: none;
    margin: 0;
}

.form-form .form-form-wrap form .field-wrapper.input > svg,
.auth-field > svg {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--auth-accent);
    fill: none;
    z-index: 1;
    pointer-events: none;
}

.form-form .form-form-wrap form .field-wrapper input,
.auth-field .form-control {
    display: block;
    width: 100%;
    min-height: var(--auth-field-h);
    height: var(--auth-field-h);
    border-radius: var(--auth-radius);
    border: 1px solid var(--auth-line);
    background: #fff;
    color: var(--auth-ink);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0 2.75rem 0 2.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: none;
}

.form-form .form-form-wrap form .field-wrapper input::placeholder,
.auth-field .form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-form .form-form-wrap form .field-wrapper input:hover,
.auth-field .form-control:hover {
    border-color: #c5d0e0;
}

.form-form .form-form-wrap form .field-wrapper input:focus,
.auth-field .form-control:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
    outline: none;
}

.auth-toggle-pass {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.auth-toggle-pass:hover,
.auth-toggle-pass:focus {
    color: var(--auth-accent);
    outline: none;
    background: var(--auth-accent-soft);
}

.auth-toggle-pass .hide {
    display: none;
}

.auth-toggle-pass[aria-pressed="true"] .icon-eye {
    display: none;
}

.auth-toggle-pass[aria-pressed="true"] .icon-eye-off {
    display: block;
}

.auth-toggle-pass[aria-pressed="true"] .icon-eye-off.hide {
    display: block;
}

/* Campo com botao olho: padding extra a direita */
.auth-field:has(.auth-toggle-pass) .form-control {
    padding-right: 3rem;
}

/* Lock screen — avatar + nome */
.auth-user-meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--auth-line);
    flex-shrink: 0;
}

.auth-user-name {
    margin: 0 0 0.2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--auth-ink);
    line-height: 1.2;
}

.auth-user-lead {
    margin: 0 !important;
}

/* Faixa mobile (painel resumido) */
.auth-mobile-strip {
    display: none;
}

.form-form .form-form-wrap form .field-wrapper a.forgot-pass-link {
    width: auto;
    display: inline;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0;
    color: var(--auth-accent);
    margin: 0;
    text-align: right;
    text-decoration: none;
}

.form-form .form-form-wrap form .field-wrapper a.forgot-pass-link:hover {
    text-decoration: underline;
}

.form-form .form-form-wrap form .field-wrapper.keep-logged-in {
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.form-form .form-form-wrap form .field-wrapper.keep-logged-in label,
.form-form .form-form-wrap form .field-wrapper .n-chk label {
    font-size: 0.875rem;
    color: var(--auth-muted);
    padding-left: 31px;
    font-weight: 500;
}

.form-form .form-form-wrap form .field-wrapper .n-chk .new-control-indicator {
    top: 1px;
    border: 1px solid #bfc9d4;
    background-color: #f8fafc;
}

.auth-submit {
    margin-top: 1.25rem;
}

.auth-btn,
.form-form .form-form-wrap form .field-wrapper button.btn.auth-btn,
.form-form .form-form-wrap form .field-wrapper button.btn-submit {
    width: 100%;
    min-height: 48px;
    border-radius: var(--auth-radius);
    font-weight: 700;
    font-size: 0.975rem;
    letter-spacing: 0.01em;
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-btn:hover,
.form-form .form-form-wrap form .field-wrapper button.btn.auth-btn:hover {
    background: #1546c2;
    border-color: #1546c2;
    box-shadow: 0 8px 20px rgba(27, 85, 226, 0.28);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-back-link,
.form-form .form-form-wrap form .btn.btn-link {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-top: 0.85rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-back-link:hover,
.form-form .form-form-wrap form .btn.btn-link:hover {
    color: var(--auth-accent);
    text-decoration: underline;
}

.form-form .terms-conditions {
    max-width: none;
    margin: 2rem 0 0;
    color: var(--auth-muted);
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.55;
}

.form-form .terms-conditions a {
    color: var(--auth-accent);
    font-weight: 600;
}

/* --- Painel direito --- */
.form-image {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 52%;
    min-height: 100vh;
}

.form-image .l-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--auth-panel);
    background-image:
        linear-gradient(160deg, rgba(11, 18, 36, 0.35) 0%, rgba(11, 18, 36, 0.12) 45%, rgba(11, 18, 36, 0.55) 100%),
        url(../../img/user/signin/auth-panel-hero.webp);
    background-position: center center, center center;
    background-repeat: no-repeat;
    background-size: cover, cover;
    overflow: hidden;
    animation: auth-panel-fade 0.85s ease both;
}

.auth-panel-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 18, 36, 0.15) 0%, rgba(11, 18, 36, 0.55) 70%, rgba(11, 18, 36, 0.85) 100%);
    pointer-events: none;
}

.auth-panel-copy {
    position: absolute;
    left: 2.5rem;
    right: 2.5rem;
    bottom: 2.75rem;
    z-index: 1;
    color: #f8fafc;
    max-width: 28rem;
    animation: auth-panel-in 0.7s ease both;
}

.auth-panel-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    margin: 0 0 0.65rem;
}

.auth-panel-title {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
    color: #fff;
}

@keyframes auth-panel-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-panel-fade {
    from {
        opacity: 0.55;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes auth-form-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-mobile-strip {
    animation: auth-panel-in 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .auth-panel-copy,
    .auth-btn,
    .form-image .l-image,
    .form-form .form-content,
    .auth-mobile-strip,
    .auth-brand-mark {
        animation: none;
        transition: none;
    }
}

/* --- Legado: toggle switch (outras telas auth) --- */
.form-form .form-form-wrap form .field-wrapper.toggle-pass p {
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 0;
}

.form-form .form-form-wrap form .field-wrapper.toggle-pass {
    align-self: center;
    text-align: left;
}

.form-form .form-form-wrap form .field-wrapper.toggle-pass .switch {
    margin-bottom: 0;
    vertical-align: sub;
    margin-left: 7px;
}

@media (max-width: 991px) {
    .form-container.auth-signin {
        flex-direction: column;
    }

    .form-form {
        width: 100%;
        order: 2;
        min-height: auto;
    }

    .form-form .form-form-wrap {
        max-width: 440px;
        min-height: auto;
        padding: 1.75rem 1.25rem 2.5rem;
    }

    .form-image {
        display: none;
    }

    .auth-mobile-strip {
        display: block;
        order: 1;
        width: 100%;
        padding: 1.15rem 1.25rem 1.25rem;
        background:
            radial-gradient(ellipse 90% 120% at 85% 0%, rgba(27, 85, 226, 0.45), transparent 55%),
            linear-gradient(135deg, #0b1224 0%, #132049 100%);
        color: #f8fafc;
        box-sizing: border-box;
    }

    .auth-mobile-strip-kicker {
        margin: 0 0 0.35rem;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(148, 163, 184, 0.95);
    }

    .auth-mobile-strip-title {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: -0.02em;
        color: #fff;
        max-width: 28rem;
    }

    body {
        background: var(--auth-surface);
    }
}

@media (max-width: 575px) {
    .auth-title {
        font-size: 1.5rem;
    }

    .auth-brand {
        margin-bottom: 1.5rem;
    }

    .auth-label-row {
        flex-wrap: wrap;
    }
}
