* {
    box-sizing: border-box;
}

:root {
    --entity-color: #194e85;
    --page-bg: #FFFFFF;
    --card-bg: #ffffff;
    --text-color: #111827;
    --muted-color: #6b7280;
    --border-color: #d8dee4;
    --soft-border-color: #e5e7eb;
    --input-bg: #ffffff;
    --danger-color: #b42318;
    --warning-color: #b45309;
    --success-color: #0a7f4f;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--entity-color);
    outline-offset: 3px;
}

html,
body {
    min-height: 100vh;
}

body {
    margin: 0;
    font-family: Lato, Arial, sans-serif;
    color: var(--text-color);
    background: var(--page-bg);
    line-height: 1.5;
}

a {
    color: var(--entity-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.form-section {
    padding: 3rem 0;
}

.page-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-container .form-card,
.page-container .result-card,
.page-container .alert-box,
.page-container .protocol-not-found {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.page-container .form-card + .form-card,
.page-container .form-card + .result-card,
.page-container .result-card + .result-card,
.page-container .alert-box + .form-card,
.page-container .protocol-not-found + .form-card {
    margin-top: 1.5rem;
}

.page-title {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.form-card,
.result-card {
    max-width: 1120px;
    margin: 0 auto 1.5rem;
    padding: 2rem;
    border: 1px solid var(--soft-border-color);
    border-radius: 18px;
    background: var(--card-bg);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.form-header,
.page-title {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: var(--entity-color);
    color: #ffffff;
}

.form-header h1,
.page-title h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: none;
}

.form-header p {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0.95;
}

.field {
    padding: 0.55rem;
    margin-bottom: 1rem;
}

label,
.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--text-color);
}

.required {
    color: var(--entity-color);
}

.form-control,
.form-select,
.field-input,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.96rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:hover,
.form-select:hover,
.field-input:hover,
textarea:hover {
    border-color: #b8c0cc;
}

.form-control:focus,
.form-select:focus,
.field-input:focus,
textarea:focus {
    border-color: var(--entity-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--entity-color) 18%, transparent);
    outline: none;
}

.form-control::placeholder,
.field-input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

textarea,
textarea.form-control,
textarea.field-input {
    min-height: 155px;
    resize: vertical;
}

select.form-select,
select.field-input {
    cursor: pointer;
}

input[type="file"].form-control,
input[type="file"].field-input {
    height: auto;
    min-height: 48px;
    padding: 9px 12px;
    cursor: pointer;
}

.form-text,
.help-text {
    margin-top: 0.4rem;
    color: var(--muted-color);
    font-size: 0.9rem;
}

.cpf-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 48px;
    padding-top: 2.05rem;
    white-space: nowrap;
}

.cpf-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--entity-color);
    cursor: pointer;
}

.cpf-check label {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
}

.btn-submit,
.btn-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 32px;
    border: 1px solid var(--entity-color);
    border-radius: 10px;
    background: var(--entity-color);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-submit:hover,
.btn-form:hover {
    filter: brightness(0.92);
    color: #ffffff;
    text-decoration: none;
}

.btn-submit:active,
.btn-form:active {
    transform: translateY(1px);
}

.btn-submit:focus,
.btn-form:focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--entity-color) 22%, transparent);
    outline: none;
}

.btn-form.success {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-form.warning {
    background: #f47302;
    border-color: #f47302;
}

.form-actions {
    margin-top: 2rem;
}

.link-button {
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--entity-color);
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

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

.info-block {
    padding: 1rem;
}

.info-block span {
    display: block;
    color: var(--muted-color);
    font-size: 0.95rem;
}

.info-block strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.notice,
.warning-text,
.danger-text,
.alert-box {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
}

.notice {
    color: #334155;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.warning-text {
    color: var(--warning-color);
    background: #fff7ed;
    border-color: #fed7aa;
}

.danger-text {
    color: var(--danger-color);
    background: #fff1f2;
    border-color: #fecdd3;
}

.alert-box {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    color: #194e85;
    background: #eaf2fb;
    border-color: #bfdbfe;
}

.protocol-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--soft-border-color);
}

.protocol-item:last-child {
    border-bottom: 0;
}

.h-captcha {
    margin-top: 0.5rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--soft-border-color);
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    body {
        background: #ffffff;
    }

    .form-section,
    .page-container {
        padding: 1rem 0;
    }

    .form-card,
    .result-card {
        padding: 1rem;
        border-radius: 12px;
        box-shadow: none;
    }

    .form-header,
    .page-title {
        padding: 1rem;
        border-radius: 10px;
        margin-bottom: 1.25rem;
    }

    .form-header h1,
    .page-title h1 {
        font-size: 1.1rem;
    }

    .field {
        padding: 0.35rem;
        margin-bottom: 0.85rem;
    }

    .form-control,
    .form-select,
    .field-input,
    textarea {
        min-height: 46px;
        font-size: 1rem;
    }

    .cpf-check {
        justify-content: flex-start;
        min-height: auto;
        padding-top: 0.35rem;
        white-space: normal;
    }

    .form-actions,
    .text-end {
        text-align: left !important;
    }

    .btn-submit,
    .btn-form {
        width: 100%;
    }

    .protocol-item {
        flex-direction: column;
        gap: 0.35rem;
    }
}

.protocol-success-card {
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--entity-color);
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 72px;
}

.protocol-success-card h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-color);
}

.success-intro {
    max-width: 680px;
    margin: 1rem auto 1.5rem;
    color: var(--muted-color);
    font-size: 1rem;
}

.protocol-box {
    max-width: 540px;
    margin: 0 auto;
    padding: 1.5rem;
    border: 2px dashed var(--entity-color);
    border-radius: 16px;
    background: color-mix(in srgb, var(--entity-color) 8%, #ffffff);
}

.protocol-box span {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted-color);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.protocol-box strong {
    display: block;
    color: var(--entity-color);
    font-size: 2rem;
    font-weight: 900;
    word-break: break-word;
}

@media (max-width: 768px) {
    .protocol-success-card {
        text-align: left;
    }

    .success-icon {
        margin-left: 0;
    }

    .protocol-success-card h1 {
        font-size: 1.35rem;
    }

    .protocol-box {
        padding: 1rem;
    }

    .protocol-box strong {
        font-size: 1.45rem;
    }
}

.form-card.compact-card {
    max-width: 1120px;
}

.form-card .btn-form {
    min-height: 48px;
    border-radius: 10px;
}

.page-subtitle {
    margin: 0.5rem 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}

.compact-card .btn-form {
    width: 100%;
}

.compact-card .link-button {
    margin-left: 0.55rem;
    margin-top: 0.25rem;
}

.result-card .btn-form {
    min-width: 170px;
}

.result-card .notice + .mt-4 {
    margin-top: 1.5rem !important;
}

.btn-submit,
.btn-form {
    width: 100%;
}

.recover-button-field {
    padding-top: 0.55rem;
}

@media (max-width: 768px) {
    .recover-button-field {
        padding-top: 0;
    }
}

#esqueciProtocoloDiv.form-card {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
}

.protocol-not-found {
    max-width: 1120px;
    margin: 0 auto 1.5rem;
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.protocol-not-found-icon {
    width: 78px;
    height: 70px;
    flex: 0 0 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff1010;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    padding-top: 12px;
}

.protocol-not-found-content h2 {
    margin: 0 0 0.35rem;
    color: #ff0000;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.protocol-not-found-content p {
    margin: 0;
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 600;
}

.protocol-not-found-content p + p {
    margin-top: 2rem;
    font-weight: 400;
}

@media (max-width: 768px) {
    .protocol-not-found {
        padding: 1.25rem;
        flex-direction: column;
        gap: 1rem;
        border-radius: 12px;
    }

    .protocol-not-found-icon {
        width: 62px;
        height: 56px;
        flex-basis: 62px;
        font-size: 2rem;
        padding-top: 10px;
    }
}

.success-message-box {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 1.5rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.success-message-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 900;
}

.success-message-box strong {
    display: block;
    color: #16a34a;
    font-size: 1rem;
    font-weight: 900;
}

.success-message-box p {
    margin: 0.2rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .success-message-box {
        align-items: flex-start;
        padding: 1rem;
    }

    .success-message-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 1.4rem;
    }
}

.success-text {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #16a34a;
    border-radius: 10px;
    background: #f0fdf4;
    color: #15803d;
    font-weight: 700;
    line-height: 1.5;
}

.success-text::before {
    content: "✓";
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.cancelled-text {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    border: 1px solid #fecaca;
    border-left: 5px solid #dc2626;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 600;
    line-height: 1.6;
}

.cancelled-text-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    margin-top: 0.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc2626;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.cancelled-text-content {
    display: block;
    min-width: 0;
}

.cancelled-text a {
    color: #b91c1c;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cancelled-text a:hover {
    color: #991b1b;
}

.appeal-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.appeal-card h3 {
    margin: 0 0 1rem;
    color: #6b7280;
    font-size: 1.4rem;
    font-weight: 800;
}

.appeal-card .notice {
    margin-top: 1rem;
}

.appeal-user-text {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
}

.appeal-user-text strong {
    display: block;
    margin-bottom: 0.4rem;
    color: #111827;
    font-weight: 800;
}

.appeal-user-text p {
    margin: 0;
    line-height: 1.6;
    white-space: normal;
}

.field-help {
    display: block;
    margin-top: 0.35rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.protocol-email-success-card {
    max-width: 1120px;
}

.protocol-email-success-card .success-message-box {
    margin: 0;
    max-width: none;
}

.protocol-email-success-card .btn-form {
    width: 100%;
}

.btn-form.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

.btn-form.secondary:hover {
    background: #e9ecef;
    color: #343a40;
    border-color: #adb5bd;
}