/**
 * Arthrom - Sistema de GestÃ£o
 * -------------------------------------------------------
 * Arquivo      : auth.css
 * ResponsÃ¡vel  : Layout das pÃ¡ginas de autenticaÃ§Ã£o
 * -------------------------------------------------------
 */

@font-face {
    font-family: "usuzi";
    src: url("../fonts/usuzi.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* â”€â”€ Reset / Base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: #fff;
    color: #1f2937;
}

/* â”€â”€ Estrutura da pÃ¡gina â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-page {
    display: flex;
    min-height: 100vh;
    background: #ffffff;
}

/* â”€â”€ Painel esquerdo â€” identidade visual â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-brand {
    flex: 0 0 52%;
    background: linear-gradient(180deg, #1f5b93 0%, #153f68 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 4rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-content {
    color: #fff;
    text-align: left;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 390px;
    padding: 16px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-logo-image {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.9rem;
    line-height: 1.3;
    color: #ffffff;
}

.auth-brand-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 390px;
    margin: 0;
}

.auth-brand-footer {
    margin-top: 2.8rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    max-width: 385px;
}

.polaris-signature {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.usuzi-font,
.auth-brand-footer .polaris-name {
    font-family: "usuzi", sans-serif !important;
    font-weight: normal;
    font-size: 32px;
    letter-spacing: 1px;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-brand-footer .polaris-name {
    color: rgba(255, 255, 255, 0.14);
    margin: 0;
    display: block;
    width: max-content;
}

.auth-brand-footer .polaris-sub {
    font-size: 0.48rem;
    letter-spacing: 4.2px;
    color: rgba(255, 255, 255, 0.22);
    text-transform: uppercase;
    width: 100%;
    display: block;
    text-align: center;
    margin: -3px 0 0;
}

/* â”€â”€ Painel direito â€” formulÃ¡rio â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-form-area {
    flex: 1;
    background: #fff;
    border-radius: 68px 0 0 68px;
    margin-left: -72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem 2.5rem 4rem;
    position: relative;
    z-index: 2;
    box-shadow: -14px 0 42px rgba(17, 24, 39, 0.1);
}

.auth-form-wrap {
    width: 100%;
    max-width: 470px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* â”€â”€ Textos do formulÃ¡rio â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #4f88ff;
    margin-bottom: 0.5rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2e42;
    margin: 0 0 0.55rem;
}

.auth-subtitle {
    color: #7f8ea3;
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0 0 1.55rem;
}

/* â”€â”€ Alerta de erro â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-alert {
    padding: 0.85rem 1rem;
    background: #fff1f1;
    border: 1px solid #ffd4d4;
    border-radius: 10px;
    color: #d25757;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.auth-alert-success {
    background: #effaf3;
    border-color: #b8e7c8;
    color: #257547;
}

/* â”€â”€ FormulÃ¡rio â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-form label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #374151;
}

.auth-form .form-control {
    border: 1px solid #d8e0eb;
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
    font-size: 0.92rem;
    color: #111;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #a8bfe0;
    box-shadow: none;
}

.auth-form .form-control.is-invalid {
    border-color: #dc2626;
}

.invalid-feedback {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 4px;
}

/* ── Shell de campo (padrão do sistema) ───────────────────── */
.auth-form .arthrom-cadastro-field__shell {
    display: flex;
    align-items: center;
    min-height: 3.2rem;
    border: 1px solid #d8e0eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.auth-form .arthrom-cadastro-field__shell:focus-within {
    border-color: #1f5b93;
    box-shadow: 0 0 0 0.18rem rgba(31, 91, 147, 0.14);
    transform: translateY(-1px);
}

.auth-form .arthrom-cadastro-field__shell:has(.form-control.is-invalid) {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.18rem rgba(220, 38, 38, 0.14);
}

.auth-form .arthrom-cadastro-field__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    flex: 0 0 3.1rem;
    align-self: stretch;
    border-right: 1px solid #dbe5f4;
    color: #4f83e4;
    background: linear-gradient(180deg, rgba(245, 248, 255, .96), rgba(255, 255, 255, .96));
    font-size: 0.98rem;
}

.auth-form .arthrom-cadastro-field__shell:has(.form-control.is-invalid) .arthrom-cadastro-field__icon {
    color: #dc2626;
    border-right-color: rgba(220, 38, 38, 0.2);
    background: linear-gradient(180deg, rgba(255, 245, 245, .98), rgba(255, 250, 250, .98));
}

.auth-form .arthrom-cadastro-field__shell .form-control {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    min-height: 3.2rem;
    flex: 1;
}

.auth-form .arthrom-cadastro-field__shell .form-control:focus {
    transform: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

/* ── Campo senha com toggle ───────────────────────────────── */
.password-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.password-wrap .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9aa8ba;
    cursor: pointer;
    padding: 0;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1;
    transition: color .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
}

.password-toggle__icon svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* â”€â”€ BotÃ£o entrar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(180deg, #174f83 0%, #14497a 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.95rem 1rem;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .2s;
    margin-top: 0.15rem;
    box-shadow: 0 10px 18px rgba(20, 73, 122, 0.18);
}

.btn-auth:hover {
    background: linear-gradient(180deg, #1a588f 0%, #174f83 100%);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* â”€â”€ Links auxiliares â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-links {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.auth-links-center {
    justify-content: center;
}

.auth-link {
    font-size: 0.82rem;
    color: #4f88ff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.auth-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    color: currentColor;
    flex: 0 0 auto;
}

.auth-link__icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-link:hover {
    text-decoration: underline;
}

/* â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 0.78rem;
    margin-top: 2rem;
}

/* â”€â”€ Spinner (envio do form) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 768px) {
    html,
    body.auth-body {
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
        overscroll-behavior: none;
    }

    body.auth-body {
        touch-action: manipulation;
        background: #ffffff;
    }

    .auth-page {
        display: flex;
        flex-direction: column;
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
        background: #ffffff;
    }

    .auth-brand {
        flex: 0 0 auto;
        display: block;
        width: 100%;
        padding: 0;
        background: linear-gradient(180deg, #174f83 0%, #14497a 100%);
    }

    .auth-brand-content {
        max-width: none;
        padding: 10px 14px 14px;
        text-align: center;
    }

    .auth-logo {
        max-width: none;
        margin: 0 0 10px;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .auth-logo-image {
        max-width: 100%;
    }

    .auth-brand-title {
        font-size: 1.05rem;
        margin: 0;
        text-align: center;
    }

    .auth-brand-text,
    .auth-brand-footer {
        display: none;
    }

    .auth-form-area {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: hidden;
        background: #ffffff;
        border-radius: 0;
        margin-left: 0;
        box-shadow: none;
        padding: 16px 14px 0;
    }

    .auth-form-wrap {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
        max-width: 100%;
    }

    .auth-card {
        flex: 0 0 auto;
        max-width: 100%;
        margin: 0;
    }

    .auth-footer {
        flex-shrink: 0;
        margin-top: auto;
        padding: 0.9rem 0 calc(0.9rem + env(safe-area-inset-bottom, 0px));
        text-align: center;
        font-size: 0.74rem;
    }

    .auth-kicker { margin-bottom: 0.7rem; }
    .auth-title { font-size: 1.05rem; margin-bottom: 0.55rem; }
    .auth-subtitle { font-size: 0.78rem; margin-bottom: 1.3rem; }
    .auth-form { gap: 0.95rem; }
    .auth-form label { font-size: 0.84rem; }
    .auth-form .form-control { padding: 0.8rem 0.9rem; font-size: 0.9rem; }
    .btn-auth { margin-top: 0.1rem; padding: 0.85rem 1rem; box-shadow: none; }
    .auth-links { margin-top: 0.7rem; }
    .auth-link { font-size: 0.8rem; }
}
