/* ============================================
   PENSE NA COPA - PenseFarma
   Mobile-first, profissional, tema Copa
   ============================================ */

:root {
    /* Brand PenseFarma */
    --brand-blue: #1B3A8A;
    --brand-blue-dark: #122861;
    --brand-blue-light: #2C50A8;

    /* Tema Copa Brasil */
    --copa-green: #009C3B;
    --copa-green-dark: #007A2E;
    --copa-yellow: #FFDF00;
    --copa-yellow-dark: #E5C700;
    --copa-blue: #002776;

    /* Neutros */
    --white: #ffffff;
    --gray-50: #FAFBFC;
    --gray-100: #F3F5F8;
    --gray-200: #E4E9F0;
    --gray-300: #CBD3DF;
    --gray-400: #9AA5B5;
    --gray-500: #6B7585;
    --gray-700: #3D4654;
    --gray-900: #1A1F2B;

    /* Feedback */
    --error: #E63946;
    --error-bg: #FDECEE;
    --success: #28A745;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Tipografia */
    --font-display: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Poppins', system-ui, sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: linear-gradient(180deg, #f0f4ff 0%, #e8efff 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: env(safe-area-inset-bottom);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--brand-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--brand-blue-dark);
}

/* ============================================
   BACKGROUND DECORATIVO
   ============================================ */
.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 800px 600px at 20% 0%, rgba(0, 156, 59, 0.08), transparent 60%),
        radial-gradient(ellipse 600px 800px at 100% 30%, rgba(255, 223, 0, 0.08), transparent 60%),
        radial-gradient(ellipse 700px 500px at 50% 100%, rgba(27, 58, 138, 0.06), transparent 70%);
    pointer-events: none;
}

.bg-confetti {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    overflow: hidden;
}

.bg-confetti span {
    position: absolute;
    top: 0;
    width: 10px;
    height: 16px;
    opacity: 0;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    will-change: transform, opacity;
    animation: confettiFall 10s linear infinite both;
}

.bg-confetti span:nth-child(1) { left: 5%; background: var(--copa-green); animation-delay: 0s; }
.bg-confetti span:nth-child(2) { left: 15%; background: var(--copa-yellow); animation-delay: 1s; }
.bg-confetti span:nth-child(3) { left: 25%; background: var(--brand-blue); animation-delay: 3s; }
.bg-confetti span:nth-child(4) { left: 35%; background: var(--copa-green); animation-delay: 5s; }
.bg-confetti span:nth-child(5) { left: 45%; background: var(--copa-yellow); animation-delay: 7s; }
.bg-confetti span:nth-child(6) { left: 55%; background: var(--brand-blue); animation-delay: 2s; }
.bg-confetti span:nth-child(7) { left: 65%; background: var(--copa-green); animation-delay: 4s; }
.bg-confetti span:nth-child(8) { left: 75%; background: var(--copa-yellow); animation-delay: 6s; }
.bg-confetti span:nth-child(9) { left: 85%; background: var(--brand-blue); animation-delay: 8s; }
.bg-confetti span:nth-child(10) { left: 95%; background: var(--copa-green); animation-delay: 10s; }

@keyframes confettiFall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0;
    }
    5% { opacity: 0.85; }
    90% { opacity: 0.85; }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 32px;
}

/* ============================================
   HERO BANNER (imagem oficial)
   ============================================ */
.hero {
    padding: 0;
    margin: 0 -16px 24px;
}

.hero-banner-img {
    display: block;
    width: 100%;
    line-height: 0;
}

.hero-banner-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ============================================
   FORM SECTION
   ============================================ */
.form-section {
    margin-top: 20px;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
}


.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
        var(--copa-green) 0%,
        var(--copa-green) 33%,
        var(--copa-yellow) 33%,
        var(--copa-yellow) 66%,
        var(--brand-blue) 66%,
        var(--brand-blue) 100%);
}

/* ============================================
   INTRO / INSTRUÇÃO DO FORMULÁRIO
   ============================================ */
.form-intro {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.form-intro-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(17px, 4.5vw, 20px);
    color: var(--brand-blue);
    line-height: 1.3;
    margin-bottom: 8px;
}

.form-intro-text {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
    max-width: 460px;
    margin: 0 auto;
}

.form-intro-text strong {
    color: var(--copa-green-dark);
    font-weight: 600;
}

/* ============================================
   STEP ICONS
   ============================================ */
.step-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--copa-green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 156, 59, 0.35);
}

/* ============================================
   FORM BLOCKS
   ============================================ */
.form-block {
    padding: 20px 0;
    border-top: 1px solid var(--gray-100);
}

.form-block:first-of-type {
    padding-top: 0;
    border-top: none;
}

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

.block-header h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(15px, 4vw, 17px);
    color: var(--brand-blue);
    line-height: 1.3;
}

.block-header h3 .essential {
    color: var(--gray-400);
    font-weight: 500;
    font-size: 13px;
}

/* ============================================
   FORM GROUPS / INPUTS
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--gray-400);
    font-weight: 500;
    font-size: 12px;
}

.form-group label .optional {
    color: var(--gray-400);
    font-weight: 400;
    font-size: 12px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--gray-900);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input:hover {
    border-color: var(--gray-300);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(27, 58, 138, 0.1);
}

.form-group.has-error input {
    border-color: var(--error);
    background: var(--error-bg);
}

.form-group.has-error input:focus {
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.error-msg {
    display: block;
    color: var(--error);
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    min-height: 0;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.error-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RADIO GROUP
   ============================================ */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.radio-option:hover {
    background: var(--white);
    border-color: var(--gray-300);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    background: var(--white);
    position: relative;
    transition: all 0.2s ease;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--copa-green);
    transition: transform 0.2s ease;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
    border-color: var(--copa-green);
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-option:has(input[type="radio"]:checked) {
    background: rgba(0, 156, 59, 0.05);
    border-color: var(--copa-green);
}

.radio-label {
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
}

/* ============================================
   CHECKBOXES
   ============================================ */
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    user-select: none;
}

.checkbox-option:last-of-type {
    margin-bottom: 0;
}

.checkbox-option:hover {
    background: var(--white);
    border-color: var(--gray-300);
}

.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    position: relative;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    width: 6px;
    height: 11px;
    border-right: 2.5px solid var(--white);
    border-bottom: 2.5px solid var(--white);
    transition: transform 0.2s ease;
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--copa-green);
    border-color: var(--copa-green);
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-custom::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.checkbox-option:has(input[type="checkbox"]:checked) {
    background: rgba(0, 156, 59, 0.05);
    border-color: var(--copa-green);
}

.checkbox-label {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--brand-blue);
    font-weight: 600;
}

.checkbox-label .tag-req,
.checkbox-label .tag-opt {
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.checkbox-label .tag-req {
    color: var(--copa-green-dark);
}

.checkbox-label .tag-opt {
    color: var(--gray-400);
}

/* ============================================
   NOTA DESTACADA DENTRO DE UM BLOCO
   ============================================ */
.block-note {
    background: linear-gradient(135deg, rgba(255, 223, 0, 0.18), rgba(0, 156, 59, 0.10));
    border-left: 4px solid var(--copa-green);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 16px;
}

.block-note strong {
    color: var(--copa-green-dark);
}

/* ============================================
   LEITURA QR CODE (NFC-e)
   ============================================ */
.qr-scan {
    margin-bottom: 16px;
}

.btn-qr {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--white);
    border: 2px dashed var(--brand-blue-light);
    border-radius: var(--radius-md);
    color: var(--brand-blue);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s ease;
}

.btn-qr svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.btn-qr:hover {
    background: rgba(27, 58, 138, 0.04);
    border-color: var(--brand-blue);
    transform: translateY(-1px);
}

.qr-hint {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
    margin-top: 8px;
    text-align: center;
}

.qr-link {
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.qr-link:hover { color: var(--brand-blue-dark); }

.qr-reader-wrap {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#qrReader {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--gray-200);
}

#qrReader video {
    display: block;
    width: 100% !important;
    height: auto !important;
}

.btn-qr-cancel {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: underline;
}

.qr-paste {
    margin-top: 12px;
}

.qr-paste label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.qr-paste-row {
    display: flex;
    gap: 8px;
}

.qr-paste-row input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--gray-900);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    -webkit-appearance: none;
    appearance: none;
}

.qr-paste-row input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(27, 58, 138, 0.1);
}

.btn-qr-confirm {
    flex-shrink: 0;
    padding: 0 18px;
    background: var(--brand-blue);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.btn-qr-confirm:hover { background: var(--brand-blue-dark); }

.qr-result {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(0, 156, 59, 0.08);
    border: 1px solid var(--copa-green);
    border-radius: var(--radius-md);
}

.qr-result-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--copa-green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.qr-result-text {
    flex: 1;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.4;
}

.qr-result-text strong { color: var(--copa-green-dark); }

.qr-result-clear {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--white);
    color: var(--gray-500);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qr-result-clear:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* ============================================
   CAPTCHA
   ============================================ */
.captcha-block {
    margin: 20px 0 8px;
    display: flex;
    justify-content: center;
    min-height: 32px;
}

.cf-turnstile {
    max-width: 100%;
}

/* ============================================
   BOTÃO SUBMIT
   ============================================ */
.btn-submit {
    width: 100%;
    margin-top: 24px;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--copa-green) 0%, var(--copa-green-dark) 100%);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 156, 59, 0.4);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-submit:hover::before {
    opacity: 1;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 156, 59, 0.5);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 156, 59, 0.4);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, var(--gray-400), var(--gray-500));
    box-shadow: none;
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-disabled-hint {
    text-align: center;
    font-size: 12px;
    color: var(--gray-500);
    margin: 10px 0 0;
    line-height: 1.4;
    transition: opacity 0.2s;
}

.btn-disabled-hint.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* ============================================
   SELO LGPD / SEGURANÇA
   ============================================ */
.security-seal {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--gray-200);
}

.security-seal svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--copa-green);
}

.security-seal p {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
    margin: 0;
}

.security-seal strong {
    color: var(--gray-700);
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.security-seal a {
    color: var(--copa-green-dark);
    font-weight: 600;
}

.btn-submit .btn-text {
    position: relative;
    z-index: 1;
}

.btn-submit .btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    position: relative;
    z-index: 1;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loader {
    display: inline-block;
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: 32px;
    padding: 20px 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

.footer-small {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ============================================
   MODAL SUCESSO
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

.checkmark-circle {
    stroke: var(--copa-green);
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: checkmarkStroke 0.6s ease forwards;
}

.checkmark-check {
    stroke: var(--copa-green);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkmarkStroke 0.4s ease 0.4s forwards;
}

@keyframes checkmarkStroke {
    to { stroke-dashoffset: 0; }
}

.modal-content h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    color: var(--brand-blue);
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-modal {
    padding: 14px 32px;
    background: var(--brand-blue);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-modal:hover {
    background: var(--brand-blue-dark);
    transform: translateY(-2px);
}

/* Modal de documento (Regulamento / Privacidade) */
.modal-document {
    max-width: 540px;
    text-align: left;
    padding: 28px 24px 24px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-document h3 {
    text-align: center;
    margin-bottom: 16px;
    padding-right: 24px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.55;
}

.modal-scroll h4 {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--brand-blue);
    margin: 14px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-scroll p {
    margin-bottom: 8px;
    color: var(--gray-700);
}

.modal-scroll .modal-small {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 12px;
    line-height: 1.4;
}

/* Protocolo no modal de sucesso */
.modal-protocol {
    margin-top: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.modal-protocol strong {
    font-family: 'Courier New', monospace;
    color: var(--brand-blue);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 4px;
}

.modal-tip {
    background: linear-gradient(135deg, rgba(255, 223, 0, 0.2), rgba(0, 156, 59, 0.12));
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
}

.modal-tip strong {
    color: var(--copa-green-dark);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-modal-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-modal-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Confetti explosion no modal de sucesso */
.modal-success {
    position: relative;
    overflow: visible;
}

.success-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 0;
}

.success-confetti span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 18px;
    border-radius: 2px;
    opacity: 0;
}

.modal.active .success-confetti span {
    animation: confettiExplosion 1.4s ease-out forwards;
}

.success-confetti span:nth-child(1)  { background: var(--copa-green);  --tx: -180px; --ty: -200px; --r: 90deg;  animation-delay: 0s; }
.success-confetti span:nth-child(2)  { background: var(--copa-yellow); --tx:  180px; --ty: -200px; --r: -90deg; animation-delay: 0.05s; }
.success-confetti span:nth-child(3)  { background: var(--brand-blue);  --tx: -240px; --ty:  -80px; --r: 180deg; animation-delay: 0.1s; }
.success-confetti span:nth-child(4)  { background: var(--copa-green);  --tx:  240px; --ty:  -80px; --r: -180deg; animation-delay: 0.15s; }
.success-confetti span:nth-child(5)  { background: var(--copa-yellow); --tx: -120px; --ty: -250px; --r: 270deg; animation-delay: 0.2s; }
.success-confetti span:nth-child(6)  { background: var(--brand-blue);  --tx:  120px; --ty: -250px; --r: -270deg; animation-delay: 0.05s; }
.success-confetti span:nth-child(7)  { background: var(--copa-green);  --tx: -200px; --ty:  100px; --r: 45deg;  animation-delay: 0.1s; }
.success-confetti span:nth-child(8)  { background: var(--copa-yellow); --tx:  200px; --ty:  100px; --r: -45deg; animation-delay: 0.15s; }
.success-confetti span:nth-child(9)  { background: var(--copa-green);  --tx:  -80px; --ty: -280px; --r: 360deg; animation-delay: 0.2s; }
.success-confetti span:nth-child(10) { background: var(--copa-yellow); --tx:   80px; --ty: -280px; --r: -360deg; animation-delay: 0.25s; }
.success-confetti span:nth-child(11) { background: var(--brand-blue);  --tx: -260px; --ty:  -10px; --r: 200deg; animation-delay: 0.3s; }
.success-confetti span:nth-child(12) { background: var(--copa-green);  --tx:  260px; --ty:  -10px; --r: -200deg; animation-delay: 0.05s; }
.success-confetti span:nth-child(13) { background: var(--copa-yellow); --tx:    0px; --ty: -300px; --r: 0deg;   animation-delay: 0.1s; }
.success-confetti span:nth-child(14) { background: var(--brand-blue);  --tx: -140px; --ty:  -20px; --r: 100deg; animation-delay: 0.15s; }
.success-confetti span:nth-child(15) { background: var(--copa-green);  --tx:  140px; --ty:  -20px; --r: -100deg; animation-delay: 0.2s; }
.success-confetti span:nth-child(16) { background: var(--copa-yellow); --tx:  -90px; --ty: -180px; --r: 60deg;  animation-delay: 0.25s; }
.success-confetti span:nth-child(17) { background: var(--brand-blue);  --tx:   90px; --ty: -180px; --r: -60deg; animation-delay: 0.3s; }
.success-confetti span:nth-child(18) { background: var(--copa-green);  --tx: -300px; --ty:   60px; --r: 120deg; animation-delay: 0s; }
.success-confetti span:nth-child(19) { background: var(--copa-yellow); --tx:  300px; --ty:   60px; --r: -120deg; animation-delay: 0.05s; }
.success-confetti span:nth-child(20) { background: var(--brand-blue);  --tx:    0px; --ty:  150px; --r: 180deg; animation-delay: 0.35s; }

@keyframes confettiExplosion {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(0);
        opacity: 1;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--r)) scale(1);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (min-width: 600px) {
    .main {
        padding: 0 24px 40px;
    }

    .hero {
        margin: 0 -24px 28px;
    }

    .form-card {
        padding: 32px 28px;
    }
}

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 940px) {
    .main {
        padding: 0 24px 48px;
        max-width: 980px;
    }

    .hero {
        margin: 0 -24px 32px;
        border-radius: 0;
    }

    .form-card {
        padding: 36px 32px;
        max-width: 760px;
        margin: 0 auto;
    }
}

/* ============================================
   ACESSIBILIDADE - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visível para teclado */
input:focus-visible,
button:focus-visible,
a:focus-visible,
.radio-option:focus-within,
.checkbox-option:focus-within {
    outline: 3px solid var(--copa-yellow);
    outline-offset: 2px;
}
