/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    min-height: 100%;
}


body {
    min-height: 100vh;

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #26333f;

    background: #edf0ed;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* =========================================================
   TOKENS
========================================================= */

:root {

    /* Verdes */

    --green-950: #072c17;
    --green-900: #0c4423;
    --green-800: #10522b;
    --green-700: #166f41;
    --green-600: #1d8151;
    --green-500: #2a9a61;


    /* Texto
       Azul-marinho acinzentado
    */

    --text-primary: #26333f;
    --text-secondary: #64717c;
    --text-muted: #8b969f;

    --icon-primary: #35434f;


    /* Interface */

    --border: #d9dfdb;
    --border-focus: #1d8151;

    --surface: #ffffff;
    --surface-soft: #f3f7f4;

    --danger: #a83232;
    --danger-background: #fff2f2;

    --radius-card: 16px;
    --radius-image: 15px;
    --radius-field: 8px;

}


/* =========================================================
   BACKGROUND
========================================================= */

.login-background {
    position: fixed;
    inset: 0;

    z-index: -3;

    background-image:
        url("../../imgs/login/Fundo_Login.df48e09d778c.JPG");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: scale(1.03);
}


.login-background-overlay {
    position: fixed;
    inset: 0;

    z-index: -2;

    background:
        rgba(240, 243, 240, 0.86);

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}


/* =========================================================
   PAGE
========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 34px;
}


/* =========================================================
   CARD
========================================================= */

.login-card {
    width: min(1110px, 100%);

    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(330px, 0.88fr);

    gap: 42px;

    padding: 40px;

    background: var(--surface);

    border-radius: var(--radius-card);

    box-shadow:
        0 20px 55px rgba(24, 45, 35, 0.12),
        0 4px 12px rgba(24, 45, 35, 0.07);
}


/* =========================================================
   IMAGE
========================================================= */

.login-image {
    position: relative;

    min-height: 585px;

    overflow: hidden;

    border-radius: var(--radius-image);

    background-image:
        url("../../imgs/login/Login_Sistema.2985e4a5636c.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* =========================================================
   WHITE SCREEN OVER IMAGE

   Camada clara para aumentar contraste entre fotografia,
   logo e textos sem esconder a imagem.
========================================================= */

.login-image-overlay {
    position: absolute;
    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.88) 0%,
            rgba(255, 255, 255, 0.76) 20%,
            rgba(255, 255, 255, 0.50) 38%,
            rgba(255, 255, 255, 0.24) 58%,
            rgba(255, 255, 255, 0.08) 78%,
            rgba(255, 255, 255, 0.04) 100%
        );
}


.image-content {
    position: absolute;
    inset: 0;

    z-index: 2;

    display: flex;
    flex-direction: column;

    padding: 42px 44px;
}


/* =========================================================
   BRAND
========================================================= */

.login-brand {
    width: fit-content;

    display: inline-flex;
    align-items: center;

    text-decoration: none;
    fill: var(--green-700);
}


.login-brand__logo {
    display: block;

    width: auto;
    height: 34px;

    max-width: 190px;

    object-fit: contain;
    object-position: left center;
}


/* =========================================================
   IMAGE MESSAGE
========================================================= */

.image-message {
    max-width: 350px;

    margin-top: 36px;
}


.image-message h2 {
    margin-bottom: 12px;

    color: var(--green-700);

    font-size: clamp(26px, 2.2vw, 30px);
    font-weight: 750;

    line-height: 1.16;
    letter-spacing: -0.7px;
}


.image-message p {
    max-width: 330px;

    color: #586e68;

    font-size: 19px;
    font-weight: 600;

    line-height: 1.28;
}


/* =========================================================
   CONTENT
========================================================= */

.login-content {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* =========================================================
   HEADER
========================================================= */

.login-header {
    margin-bottom: 38px;
}


.login-header h1 {
    margin-bottom: 14px;

    color: var(--text-primary);

    font-size: 32px;
    font-weight: 750;

    line-height: 1.15;
    letter-spacing: -0.9px;
}


.login-subtitle {
    color: var(--text-secondary);

    font-size: 16px;
    line-height: 1.5;
}


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

form {
    width: 100%;
}


/* =========================================================
   FIELDS
========================================================= */

.form-field {
    margin-bottom: 18px;
}


.form-field label {
    display: block;

    margin-bottom: 10px;

    color: var(--text-primary);

    font-size: 15px;
    font-weight: 650;
}


/* =========================================================
   INPUT WRAPPER
========================================================= */

.input-wrapper {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
}


/* =========================================================
   INPUT
========================================================= */

.form-field input {
    width: 100%;
    height: 57px;

    padding:
        0
        48px
        0
        55px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-field);

    outline: none;

    background: #ffffff;

    color: var(--text-primary);

    font-family: inherit;
    font-size: 15.5px;
    font-weight: 450;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}


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

    opacity: 1;
}


.form-field input:hover {
    border-color: #bdc7c1;
}


.form-field input:focus {
    border-color: var(--border-focus);

    box-shadow:
        0 0 0 3px
        rgba(29, 129, 81, 0.10);
}


/* =========================================================
   INPUT ICON
========================================================= */

.input-icon {
    position: absolute;
    left: 16px;

    z-index: 2;

    width: 22px;
    height: 22px;

    color: var(--icon-primary);

    pointer-events: none;
}


/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.password-toggle {
    position: absolute;
    right: 10px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: var(--icon-primary);

    cursor: pointer;

    transition:
        background 150ms ease,
        color 150ms ease;
}


.password-toggle:hover {
    background: var(--surface-soft);

    color: var(--green-700);
}


.password-toggle:focus-visible {
    outline:
        2px solid
        var(--green-600);

    outline-offset: 1px;
}


.password-toggle svg {
    width: 22px;
    height: 22px;
}


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

.form-options {
    display: flex;
    align-items: center;

    min-height: 25px;

    margin-top: -2px;
}


.forgot-link {
    color: var(--green-700);

    font-size: 15px;
    font-weight: 650;

    text-decoration: none;

    transition: color 150ms ease;
}


.forgot-link:hover {
    color: var(--green-900);

    text-decoration: underline;
    text-underline-offset: 3px;
}


/* =========================================================
   SUBMIT
========================================================= */

.login-button {
    width: 100%;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 42px;

    padding: 0 20px;

    border: 0;
    border-radius: 7px;

    background: var(--green-700);
    color: #ffffff;

    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 2px 4px rgba(12, 68, 35, 0.08);

    transition:
        background 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}


.login-button svg {
    width: 19px;
    height: 19px;

    stroke-width: 2.3;
}


.login-button:hover {
    background: var(--green-800);

    box-shadow:
        0 6px 16px rgba(12, 68, 35, 0.16);
}


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


.login-button:focus-visible {
    outline:
        3px solid
        rgba(29, 129, 81, 0.25);

    outline-offset: 3px;
}


/* =========================================================
   ERROR
========================================================= */

.login-error {
    display: flex;
    align-items: center;

    gap: 9px;

    margin-bottom: 20px;

    padding: 12px 14px;

    border:
        1px solid
        rgba(168, 50, 50, 0.14);

    border-radius: 8px;

    background:
        var(--danger-background);

    color:
        var(--danger);

    font-size: 14px;
    font-weight: 600;

    line-height: 1.4;
}


.login-error svg {
    width: 18px;
    height: 18px;

    flex: 0 0 auto;
}


/* =========================================================
   SUPPORT DIVIDER
========================================================= */

.support-divider {
    display: flex;
    align-items: center;

    gap: 9px;

    margin: 30px 8px;
}


.support-divider span {
    height: 1px;

    flex: 1;

    background: #cbd1d4;
}


.support-divider small {
    color: var(--text-muted);

    font-size: 12px;
    font-weight: 650;

    white-space: nowrap;
}


/* =========================================================
   SUPPORT CARD
========================================================= */
/* ============================================================
   CARD DE SUPORTE
   ============================================================ */

.support-card {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;

    background: var(--surface-color, #ffffff);

    color: inherit;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* ============================================================
   ÍCONE
   ============================================================ */

.support-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--support-icon-bg, #f3f4f6);

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.support-icon svg {
    width: 20px;
    height: 20px;

    stroke-width: 1.8;

    transition:
        transform 0.2s ease;
}


/* ============================================================
   CONTEÚDO
   ============================================================ */

.support-content {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.support-content strong {
    display: block;

    margin: 0;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;

    color: inherit;

    transition: color 0.2s ease;
}

.support-content small {
    display: block;

    margin: 0;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;

    color: var(--text-muted, #6b7280);
}


/* ============================================================
   SETA
   ============================================================ */

.support-arrow {
    width: 18px;
    height: 18px;

    flex-shrink: 0;

    opacity: 0.55;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* ============================================================
   HOVER
   ============================================================ */

.support-card:hover {
    transform: translateY(-2px);

    border-color: var(--support-hover-border, #d1d5db);

    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.03),
        0 8px 20px rgba(0, 0, 0, 0.05);
}

.support-card:hover .support-icon {
    transform: scale(1.06);

    background: var(--support-icon-hover-bg, #e9ecef);
}

.support-card:hover .support-icon svg {
    transform: scale(1.04);
}

.support-card:hover .support-arrow {
    transform: translateX(4px);

    opacity: 1;
}


/* ============================================================
   CLIQUE
   ============================================================ */

.support-card:active {
    transform: translateY(0);

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.03),
        0 4px 10px rgba(0, 0, 0, 0.04);
}


/* ============================================================
   ACESSIBILIDADE / TECLADO
   ============================================================ */

.support-card:focus {
    outline: none;
}

.support-card:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}


/* ============================================================
   REDUÇÃO DE MOVIMENTO
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .support-card,
    .support-icon,
    .support-icon svg,
    .support-arrow {
        transition: none;
    }

    .support-card:hover,
    .support-card:active {
        transform: none;
    }

    .support-card:hover .support-icon,
    .support-card:hover .support-icon svg,
    .support-card:hover .support-arrow {
        transform: none;
    }
}

/* =========================================================
   TABLET LANDSCAPE
========================================================= */

@media (max-width: 1180px) {

    .login-page {
        padding: 28px;
    }


    .login-card {
        gap: 34px;

        padding: 34px;
    }


    .login-image {
        min-height: 560px;
    }


    .image-content {
        padding: 38px;
    }


    .login-header {
        margin-bottom: 32px;
    }


    .login-button {
        margin-top: 34px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 920px) {

    .login-page {
        padding: 26px;
    }


    .login-card {
        width: min(540px, 100%);

        display: block;

        padding: 38px;
    }


    .login-image {
        display: none;
    }


    .login-header h1 {
        font-size: 30px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    .login-page {
        align-items: flex-start;

        padding: 20px 16px;
    }


    .login-card {
        margin-top: max(20px, 6vh);

        padding: 30px 24px;

        border-radius: 14px;
    }


    .login-header {
        margin-bottom: 30px;
    }


    .login-header h1 {
        font-size: 27px;
    }


    .login-subtitle {
        font-size: 15px;
    }


    .form-field input {
        height: 54px;
    }


    .login-button {
        height: 50px;

        margin-top: 32px;
    }


    .support-divider {
        margin: 27px 4px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .login-page {
        padding: 14px;
    }


    .login-card {
        padding: 26px 20px;
    }


    .login-header h1 {
        font-size: 25px;
    }


    .support-card {
        padding: 13px;
    }


    .support-divider small {
        font-size: 11px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}

/* Toque e viewport baixa, sem reduzir os campos de autenticação. */
.login-page { min-height: 100dvh; }
.password-toggle { min-width: 44px; min-height: 44px; }
@media (min-width: 921px) and (max-height: 800px) {
    .login-page { padding: 24px; }
    .login-card { padding: 28px; gap: 28px; }
    .login-image { min-height: 500px; }
    .login-header { margin-bottom: 24px; }
    .login-button { margin-top: 24px; }
}
