* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body,
html {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #ffffff;
}

.page-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.banner-side {
    flex: 1.2;
    background: linear-gradient(rgba(76, 37, 130, 0.35), rgba(76, 37, 130, 0.35)),
        url(../imgs/prodesp.webp) no-repeat center center;
    background-size: cover;
    border-right: 4px solid #4c2582;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 24px 32px;
    background-color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-y: auto;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #777777;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    align-self: flex-start;
    padding: 8px 4px;
    min-height: 40px;
    transition: color 0.2s, transform 0.2s;
}

.btn-back:hover {
    color: #4c2582;
    transform: translateX(-3px);
}

.btn-back svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.prodesp-icon {
    width: 32px;
    height: 36px;
    fill: #4c2582;
}

.prodesp-text {
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    color: #4c2582;
    letter-spacing: -0.5px;
}

h1 {
    color: #666666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    font-weight: 600;
    text-align: center;
}

form {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

/* ── ALERTA VISUAL GLOBAL ── */
.alert-box {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: left;
    display: block;
    word-break: break-word;
    animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-box.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-box.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.alert-box[hidden],
#group-cpf.escondido-admin,
.input-group.escondido-admin,
#group-cpf[hidden],
.input-group[hidden],
[hidden] {
    display: none !important;
}

.input-group {
    position: relative;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 11px;
    color: #8e8e8e;
    margin-bottom: 2px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid #cccccc;
    padding: 8px 38px 8px 0; 
    font-size: 15px;
    color: #333333;
    background-color: transparent;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-bottom-color: #4c2582;
}

.input-group button[type="button"] {
    position: absolute;
    right: 0;
    bottom: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4c2582;
    outline: none;
}

.input-group button[type="button"] svg {
    width: 20px;
    height: 20px;
    stroke: #4c2582;
    display: block;
    transition: opacity 0.2s;
}

.input-group button[type="button"]:hover svg {
    opacity: 0.7;
}

.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    min-height: 65px;
    width: 100%;
}

button[type="submit"] {
    background-color: #4c2582;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 12px;
    min-height: 44px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s, opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: #3b1c66;
}

button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.form-footer-links {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    line-height: 1.6;
}

.form-footer-links a {
    color: #4c2582;
    text-decoration: none;
    font-weight: 600;
    padding: 4px;
}

.form-footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .banner-side {
        display: none;
    }

    main {
        padding: 24px 20px;
    }

    form {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"] {
        font-size: 16px; /* Evita zoom automático no iOS Safari */
    }
}

@media (max-width: 380px) {
    main {
        padding: 16px 12px;
    }

    form {
        max-width: 100%;
    }

    .cf-turnstile {
        transform: scale(0.92);
        transform-origin: center;
    }
}

:root {
    --primaria: #500878;
    --secundaria: #ae8cc0;
    --terciaria: #753b94;
    --fundo: #aaaaaa;
}

[hidden] {
    display: none !important;
}
