﻿* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

    body.login-page {
        margin: 0;
        min-height: 100vh;
        font-family: Arial, Helvetica, sans-serif;
        background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 45%, #ffffff 100%);
        color: #1f2937;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
    }

.login-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 34px 16px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 34px 34px 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.login-logo {
    text-align: center;
    margin-bottom: 14px;
}

    .login-logo img {
        max-width: 170px;
        height: auto;
    }

.login-badge {
    width: fit-content;
    margin: 0 auto 14px;
    padding: 6px 13px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 27px;
    font-weight: 800;
    color: #111827;
    font-family: Georgia, 'Times New Roman', serif;
}

.login-subtitle {
    margin: 12px 0 24px;
    text-align: center;
    font-size: 15px;
    color: #64748b;
    line-height: 1.5;
}

.alert-login {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #991b1b;
    padding: 13px 14px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

.validation-list {
    margin: 5px 0 0;
    padding-left: 18px;
    color: #991b1b;
}

.form-group-custom {
    margin-bottom: 18px;
}

    .form-group-custom label {
        display: block;
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 8px;
        color: #334155;
    }

.input-wrapper {
    position: relative;
}

.form-control-custom {
    width: 100%;
    height: 50px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 44px 0 15px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: #ffffff;
}

    .form-control-custom:focus {
        border-color: #16a34a;
        box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.13);
    }

.input-icon {
    position: absolute;
    right: 16px;
    top: 17px;
    color: #64748b;
}

.field-error {
    display: block;
    margin-top: 7px;
    color: #dc2626;
    font-size: 13px;
}

.captcha-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.captcha-title {
    display: block;
    font-weight: 800;
    color: #334155;
    margin-bottom: 4px;
}

.captcha-box p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
}

.captcha-center {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.btn-login {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #16a34a, #0f9f5f);
    color: white;
    font-size: 16px;
    font-weight: 800;
    transition: all 0.2s ease;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22);
}

    .btn-login:hover,
    .btn-login:focus {
        background: linear-gradient(135deg, #15803d, #047857);
        transform: translateY(-1px);
        color: #ffffff;
    }

.login-help {
    margin: 16px 0 0;
    font-size: 13px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

.login-footer {
    width: 100%;
    background: #050505;
    color: #ffffff;
    text-align: center;
    padding: 13px 12px;
    font-size: 13px;
    line-height: 1.5;
}

    .login-footer span {
        display: inline-block;
    }

/* ========================================
   HELP WIDGET
======================================== */

.help-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* BOTÃO */

.help-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 24px;
    border: none;
    border-radius: 18px;
    background: #0f172a;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
    transition: all 0.2s ease;
}

    .help-toggle:hover {
        transform: translateY(-2px);
    }

    .help-toggle span {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #10b981;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-weight: bold;
        flex-shrink: 0;
    }

/* ESCONDE BOTÃO QUANDO PAINEL ABRIR */

.help-widget.open .help-toggle {
    display: none;
}

/* PAINEL */

.help-panel {
    width: 390px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    padding: 28px;
    margin-top: 12px;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ABERTO */

.help-widget.open .help-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* BOTÃO FECHAR */

.help-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #111827;
    font-size: 22px;
    cursor: pointer;
}

/* TITULO */

.help-panel h2 {
    margin: 0 40px 12px 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
}

/* TEXTO */

.help-intro {
    margin-bottom: 20px;
    color: #64748b;
    line-height: 1.6;
}

/* ITENS */

.help-item {
    padding: 18px 0;
    border-top: 1px solid #e5e7eb;
}

    .help-item strong {
        display: block;
        margin-bottom: 8px;
        font-size: 16px;
        color: #111827;
    }

    .help-item p {
        margin: 0;
        color: #64748b;
        line-height: 1.6;
    }

/* AVISO */

.help-warning {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

    .help-warning strong {
        display: block;
        margin-bottom: 8px;
        color: #166534;
    }

    .help-warning p {
        margin: 0;
        color: #166534;
        line-height: 1.6;
    }

/* RESPONSIVO */

@media (max-width: 900px) {

    .help-widget {
        top: 12px;
        right: 12px;
    }

    .help-panel {
        width: calc(100vw - 24px);
        max-width: none;
        max-height: calc(100vh - 24px);
        padding: 22px;
    }
}

@media (max-width: 700px) {

    .login-wrapper {
        align-items: flex-start;
        padding-top: 24px;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 18px;
    }

        .login-card h1 {
            font-size: 23px;
        }

    .captcha-center {
        transform: scale(0.92);
        transform-origin: center;
    }

    .help-toggle {
        height: 52px;
        padding: 0 18px;
        font-size: 14px;
    }

    .help-panel h2 {
        font-size: 22px;
    }
}
