* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100dvh;

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

    background: #f4f6f8;
    color: #1f2937;
}

button,
input {
    font: inherit;
}

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

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

    padding: 24px;
}

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

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    padding: 36px;

    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.06);
}

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

.login-brand {
    margin-bottom: 20px;

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

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-header h1 {
    margin: 0 0 8px;

    font-size: 28px;
    line-height: 1.2;
}

.login-header p {
    margin: 0;

    font-size: 15px;
    line-height: 1.5;

    color: #6b7280;
}

.login-form {
    display: flex;
    flex-direction: column;

    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 48px;

    padding: 0 14px;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    background: #ffffff;
    color: #111827;

    outline: none;

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

.form-group input:focus {
    border-color: #6b7280;

    box-shadow:
        0 0 0 3px rgba(107, 114, 128, 0.12);
}

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

    border: 0;
    border-radius: 9px;

    padding: 12px 20px;

    background: #111827;
    color: #ffffff;

    font-weight: 600;

    cursor: pointer;

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

.login-button:hover {
    opacity: 0.92;
}

.login-button:active {
    transform: scale(0.99);
}

.login-alert {
    margin-bottom: 20px;

    padding: 12px 14px;

    border: 1px solid #fecaca;
    border-radius: 9px;

    background: #fef2f2;
    color: #991b1b;

    font-size: 14px;
    line-height: 1.4;
}

.captcha-container {
    width: 100%;

    display: flex;
    justify-content: center;

    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 480px) {

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

        padding:
            max(32px, env(safe-area-inset-top))
            18px
            24px;
    }

    .login-card {
        max-width: none;

        padding: 28px 22px;

        border-radius: 14px;
    }

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

}


/*
|--------------------------------------------------------------------------
| Telas muito pequenas
|--------------------------------------------------------------------------
*/

@media (max-width: 340px) {

    .login-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .captcha-container {
        transform: scale(0.90);
        transform-origin: center;
    }

}

/*
|--------------------------------------------------------------------------
| Confirmação de substituição de sessão
|--------------------------------------------------------------------------
*/

.login-session-message {
    margin-bottom: 20px;

    padding: 14px;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    background: #f9fafb;
    color: #4b5563;

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

.login-session-message p {
    margin: 0;
}

.login-actions {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.login-button-secondary {
    border: 1px solid #d1d5db;

    background: #ffffff;
    color: #374151;
}

.login-button-secondary:hover {
    background: #f9fafb;
    opacity: 1;
}
