/* CHECKOUT CSS RESET & STYLES */
:root {
    --bg-page: #F3F0FC;
    --primary-purple: #6C2BD9;
    --primary-purple-dark: #43129E;
    --primary-orange: #FF8A00;
    --cta-gradient: linear-gradient(90deg, #FFAA00 0%, #FF6C00 100%);

    --dce-green: #00E676;
    --dce-yellow: #FFB800;

    --text-dark: #10002B;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;

    --font-main: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* NAVBAR */
.checkout-navbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.checkout-nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left-group {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* VOLTAR BUTTON */
.btn-back-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F3F4F6;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 999px;
    color: #374151;
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-step:hover {
    background: #E5E7EB;
    color: #110026;
    transform: translateX(-2px);
}

.btn-back-step i {
    width: 16px;
    height: 16px;
}

.brand-logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-white {
    color: #10002B;
}

.logo-dce {
    font-weight: 900;
}

.dce-green {
    color: var(--dce-green);
}

.dce-yellow {
    color: var(--dce-yellow);
}

/* STEPPER PROGRESS BAR */
.checkout-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.45;
    transition: var(--transition);
}

.step-item.active {
    opacity: 1;
}

.step-item.completed .step-badge {
    background: #00E676;
    color: white;
}

.step-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E5E7EB;
    color: #4B5563;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-item.active .step-badge {
    background: var(--primary-purple);
    color: white;
}

.step-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stepper-line {
    width: 24px;
    height: 2px;
    background: #E5E7EB;
}

.stepper-line.completed {
    background: var(--primary-purple);
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-purple);
    font-size: 0.85rem;
    font-weight: 700;
}

.secure-badge i {
    width: 18px;
    height: 18px;
}

/* MODAL OVERLAY: ANTES DE FINALIZAR (Print 1) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 0, 48, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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

.modal-card {
    background: #FFFFFF;
    border-radius: 24px;
    max-width: 520px;
    width: 100%;
    padding: 36px 32px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modal-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #F3F4F6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: #E5E7EB;
    color: #111827;
}

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

.modal-icon-cap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F3E8FF;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.4;
}

/* Green Box */
.modal-green-box {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.green-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #065F46;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.icon-green-check {
    width: 20px;
    height: 20px;
    color: #10B981;
}

.modal-green-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 28px;
}

.modal-green-box li {
    font-size: 0.88rem;
    color: #047857;
    font-weight: 600;
    position: relative;
}

.modal-green-box li::before {
    content: '•';
    position: absolute;
    left: -14px;
    color: #10B981;
}

/* Amber Box */
.modal-amber-box {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
    font-size: 0.85rem;
    color: #92400E;
    line-height: 1.4;
}

.icon-amber-alert {
    width: 22px;
    height: 22px;
    color: #D97706;
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-amber-box strong {
    color: #78350F;
}

.btn-modal-continue {
    width: 100%;
    padding: 16px;
    background: var(--cta-gradient);
    color: white;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 138, 0, 0.4);
    transition: var(--transition);
}

.btn-modal-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 138, 0, 0.55);
}

/* MAIN CHECKOUT LAYOUT */
.checkout-main {
    padding: 40px 0 80px;
}

.checkout-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

/* LEFT PANEL (Dynamic Step Views) */
.checkout-left-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 44px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.step-view {
    display: none;
}

.step-view.active {
    display: block;
    animation: fade-step 0.4s ease;
}

@keyframes fade-step {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.8px;
    margin-bottom: 8px;
}

.step-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

/* MODEL CARDS GRID */
.model-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.model-select-card {
    background: #FFFFFF;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 28px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.model-select-card:hover {
    border-color: var(--primary-purple);
    transform: translateY(-2px);
}

.model-select-card.selected {
    border-color: var(--primary-purple);
    background: #F8F5FF;
    box-shadow: 0 10px 30px rgba(108, 43, 217, 0.12);
}

.model-card-info h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.model-price {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-purple);
    margin-bottom: 16px;
}

.model-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #4B5563;
    font-weight: 600;
}

.model-features li i {
    width: 16px;
    height: 16px;
    color: var(--primary-purple);
}

/* Arrow Button Styling: Only the selected card gets the filled purple button */
.model-arrow-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F3F0FC;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid rgba(108, 43, 217, 0.15);
}

.model-select-card.selected .model-arrow-btn {
    background: var(--primary-purple);
    color: white;
    border-color: transparent;
}

/* STEP 2 FORM STYLING - PERFECT ICON ALIGNMENTS */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-3 .span-2 {
    grid-column: span 2;
}

.full-width {
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
}

/* Perfect icon vertical alignment in inputs */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon i:first-child,
.input-with-icon svg:first-child {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9CA3AF;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-with-icon input {
    width: 100%;
    height: 52px;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-family: var(--font-main);
    font-size: 0.98rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
    background: #FFFFFF;
}

.input-with-icon input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.65);
    padding: 4px;
}

.input-with-icon input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(108, 43, 217, 0.1);
}

.btn-toggle-eye {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-eye:hover {
    color: var(--primary-purple);
}

/* Address Section (Dynamic) */
.address-section {
    display: none;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.address-section.active {
    display: block;
    animation: fade-step 0.4s ease;
}

.address-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.address-section-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-purple-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-ip-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #059669;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 6px 12px;
    border-radius: 999px;
}

.form-submit-wrapper {
    margin-top: 36px;
    display: flex;
    justify-content: flex-end;
}

.btn-finalizar-compra {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: var(--cta-gradient);
    color: white;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 138, 0, 0.4);
    transition: var(--transition);
}

.btn-finalizar-compra:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 138, 0, 0.55);
}

/* STEP 3 PAGAMENTO PIX (Print 4 Gateway Integration) */
.pix-timer-bar {
    background: #F3E8FF;
    border-radius: 14px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    color: #5B21B6;
    font-weight: 700;
}

.pix-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #5B21B6;
    font-weight: 700;
}

.status-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FF9900;
    box-shadow: 0 0 10px #FF9900;
    animation: status-pulse 1.5s infinite;
}

.status-pulse-dot.paid {
    background: #00E676;
    box-shadow: 0 0 10px #00E676;
}

@keyframes status-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.3);
    }
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pix-timer-bar strong {
    font-size: 1.25rem;
    font-weight: 800;
}

/* Success Modal Badge */
.success-icon-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ECFDF5;
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.success-icon-badge i,
.success-icon-badge svg {
    width: 44px;
    height: 44px;
}

.success-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #10002B;
    margin-bottom: 12px;
}

.pix-content-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}

.pix-qr-wrapper {
    padding: 16px;
    background: #FFFFFF;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.qr-code-svg {
    width: 180px;
    height: 180px;
    display: block;
}

.pix-copia-cola-block {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pix-copia-cola-block label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4B5563;
}

.pix-input-button-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F9FAFB;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px 6px 6px 16px;
}

.pix-input-button-group input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: monospace;
    font-size: 0.85rem;
    color: #374151;
    outline: none;
}

.btn-copiar-pix {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-copiar-pix:hover {
    background: var(--primary-purple-dark);
}

.pix-footer-note {
    background: #F3F4F6;
    border-radius: 14px;
    padding: 16px 20px;
    text-align: center;
    color: #4B5563;
    font-size: 0.9rem;
    font-weight: 600;
}

/* RIGHT SUMMARY SIDEBAR (Print 2, 3, 4 Replica) */
.checkout-right-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
}

.summary-tag {
    color: #FF8A00;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 6px;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.summary-purple-card {
    background: linear-gradient(135deg, #43129E 0%, #20054C 100%);
    border-radius: 18px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(32, 5, 76, 0.2);
}

.summary-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.summary-card-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-brand-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

.summary-user-name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.summary-plan-sub {
    font-size: 0.78rem;
    opacity: 0.8;
}

.summary-line-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #4B5563;
    margin-bottom: 14px;
}

/* Frete Grátis Line Breakdown */
.frete-line {
    display: none;
}

.frete-line.active {
    display: flex;
}

.frete-text {
    color: #059669;
    font-weight: 700;
}

.frete-price {
    color: #059669;
    font-weight: 800;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 16px;
    margin-top: 6px;
}

.summary-total-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.summary-total-item strong {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-dark);
}

.summary-note {
    font-size: 0.82rem;
    color: #6B7280;
    margin-bottom: 24px;
    line-height: 1.4;
}

.summary-trust-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-size: 0.82rem;
    font-weight: 700;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.summary-trust-footer i {
    width: 18px;
    height: 18px;
}

/* FLOATING WHATSAPP BUTTON */
.whatsapp-float-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
}

.whatsapp-float-btn {
    position: relative;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.55);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    animation: wa-shake-float 3.5s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.official-whatsapp-svg {
    width: 34px;
    height: 34px;
}

.wa-ping-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: wa-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

.wa-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FF3B30;
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #160136;
}

@keyframes wa-ping {

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes wa-shake-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    10% {
        transform: translateY(-8px) rotate(-4deg);
    }

    15% {
        transform: translateY(-8px) rotate(4deg);
    }

    20% {
        transform: translateY(-8px) rotate(-4deg);
    }

    25% {
        transform: translateY(0) rotate(0deg);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-right-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-nav-container {
        padding: 0 12px;
        gap: 8px;
    }

    .nav-left-group {
        gap: 8px;
    }

    .btn-back-step {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .brand-logo {
        font-size: 1.15rem;
    }

    .secure-badge {
        font-size: 0.72rem;
        gap: 4px;
        padding: 4px 8px;
    }

    .checkout-stepper {
        display: none;
    }

    .model-cards-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .form-grid-3 .span-2 {
        grid-column: span 1;
    }

    .checkout-left-card {
        padding: 28px 20px;
    }
}

/* ADMIN SIMULATION BUTTON & SUCCESS MODAL STYLING */
.admin-approve-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.btn-simular-aprovacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ECFDF5;
    color: #047857;
    border: 1px dashed #10B981;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-simular-aprovacao:hover {
    background: #10B981;
    color: white;
    border-style: solid;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.success-modal-card {
    text-align: center;
    max-width: 460px;
    padding: 36px 30px;
}

.success-icon-badge {
    width: 64px;
    height: 64px;
    background: #10B981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.4);
    animation: pop-bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon-badge i,
.success-icon-badge svg {
    width: 32px;
    height: 32px;
    stroke-width: 3px;
}

.success-order-box {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 18px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    color: #4B5563;
}

.success-detail-row strong {
    color: #111827;
}

.badge-approved {
    background: #DEF7EC;
    color: #03543F;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}

.success-note {
    font-size: 0.88rem;
    color: #6B7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

@keyframes pop-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* STEP 4 PHOTO UPLOADER & SELECT STYLING */
.photo-upload-box {
    border: 2px dashed #CBD5E1;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    background: #F8FAFC;
    cursor: pointer;
    transition: var(--transition);
}

.photo-upload-box:hover {
    border-color: var(--primary-purple);
    background: #F3F0FC;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon-circle {
    width: 52px;
    height: 52px;
    background: #EDE9FE;
    color: var(--primary-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.upload-icon-circle i,
.upload-icon-circle svg {
    width: 26px;
    height: 26px;
}

.upload-placeholder strong {
    font-size: 0.98rem;
    color: var(--text-dark);
}

.upload-placeholder span {
    font-size: 0.82rem;
    color: #64748B;
}

.photo-tip {
    margin-top: 6px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.78rem !important;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-preview img {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid var(--primary-purple);
    box-shadow: 0 8px 20px rgba(108, 43, 217, 0.2);
}

.btn-change-photo {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.select-escolaridade {
    width: 100%;
    height: 52px;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-family: var(--font-main);
    font-size: 0.98rem;
    color: var(--text-dark);
    background: white;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select-escolaridade:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(108, 43, 217, 0.1);
}

.select-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9CA3AF;
    width: 20px;
    height: 20px;
}

.text-center {
    text-align: center;
}

.success-step-box {
    padding: 20px 0;
}

.success-step-icon {
    width: 72px;
    height: 72px;
    background: #10B981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
    animation: pop-bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-step-icon i,
.success-step-icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 3px;
}

/* INLINE ERROR MESSAGES */
.inline-error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    margin-top: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.inline-error-msg i,
.inline-error-msg svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* AUTO-ADVANCE LOADING BOX STYLING */
.pix-auto-advance-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
    margin-top: 24px;
}

.pix-auto-advance-box i,
.pix-auto-advance-box svg {
    width: 20px;
    height: 20px;
}

.spin {
    animation: spin-rotate 1.2s linear infinite;
    display: inline-block;
}

@keyframes spin-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   CARTEIRA ESTUDANTIL OFICIAL ABAFE - REAL IMAGE OVERLAY (PIXEL-PERFECT)
   ========================================================================== */
.card-preview-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.card-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.card-section-sub {
    font-size: 0.9rem;
    color: #6B7280;
    margin-bottom: 24px;
}

.card-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 0 auto;
    max-width: 600px;
}

/* Estreitamento Proporcional 1024x768 -> 512x384 (50% scale) */
.abafe-card-real {
    width: 512px;
    height: 384px;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    text-align: left;
}

.abafe-card-real.front-card {
    background-image: url('card_frente_clean_template.png');
}

.abafe-card-real.back-card {
    background-image: url('card_verso_base.jpg');
}

/* FOTO 3X4 (Encaixada perfeitamente no espaço limpo da esquerda) */
.real-card-photo-box {
    position: absolute;
    top: 122px;
    left: 32px;
    width: 140px;
    height: 205px;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
}

.real-card-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* NOME DO ESTUDANTE (Texto puro sem caixa de fundo, posicionado no topo acima da foto) */
.real-card-name {
    position: absolute;
    top: 96px;
    left: 35px;
    font-size: 13.5px;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    z-index: 10;
}

/* CPF / CIN (Texto puro após o rótulo original) */
.real-card-cpf {
    position: absolute;
    top: 138px;
    left: 236px;
    font-size: 12.5px;
    font-weight: 700;
    color: #000000;
    z-index: 10;
}

/* DATA DE NASCIMENTO (Texto puro após o rótulo original) */
.real-card-dob {
    position: absolute;
    top: 163px;
    left: 215px;
    font-size: 12.5px;
    font-weight: 700;
    color: #000000;
    z-index: 10;
}

/* GRADUAÇÃO EM: (Texto puro no espaço em branco) */
.real-card-course {
    position: absolute;
    top: 200px;
    left: 178px;
    font-size: 11.5px;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 195px;
    z-index: 10;
}

/* CIDADE - UF (Texto puro abaixo da escolaridade) */
.real-card-city {
    position: absolute;
    top: 222px;
    left: 178px;
    font-size: 11px;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 195px;
    z-index: 10;
}

/* QR CODE (Aumentado de 86px para 92px, centralizado na coluna) */
.real-card-qrcode-box {
    position: absolute;
    top: 100px;
    right: 38px;
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    z-index: 10;
}

.real-card-qrcode-box img,
.real-card-qrcode-box canvas {
    width: 100% !important;
    height: 100% !important;
}

/* RÓTULO COD. USO / CIE (Abaixo do QR Code, centralizado na coluna) */
.real-card-cie-label {
    position: absolute;
    top: 200px;
    right: 24px;
    width: 120px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* CÓDIGO CIE (Abaixo do rótulo COD. USO / CIE, centralizado) */
.real-card-code {
    position: absolute;
    top: 215px;
    right: 24px;
    width: 120px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: #000000;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* VALIDADE: 31/03/2027 (Sobreposição limpa da validade original exatamente na coluna branca) */
.real-card-validity {
    position: absolute;
    bottom: 16px;
    right: 36px;
    width: 100px;
    text-align: center;
    font-size: 8.5px;
    font-weight: 700;
    color: #374151;
    background: #FFFFFF;
    padding: 1px 0;
    z-index: 10;
}

/* AÇÕES E BOTÕES DA CARTEIRA */
.card-actions-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #059669;
    color: white;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35);
    transition: var(--transition);
}

.btn-download-pdf:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.45);
}

.btn-secondary-home {
    display: inline-flex;
    align-items: center;
    padding: 16px 28px;
    background: #F3F4F6;
    color: #374151;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary-home:hover {
    background: #E5E7EB;
    color: #111827;
}

/* ==========================================================================
   TAGS ETAPA X & NOVOS CARDS DO STEP 3 PAGAMENTO (RÉPLICA FIEL DO PRINT)
   ========================================================================== */
.step-tag-purple {
    display: inline-block;
    color: #6C2BD9;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.step-tag-sub {
    color: #6B7280;
    font-weight: 600;
    margin-left: 6px;
    text-transform: capitalize;
}

/* Box 1: Valor Total + Pagamento via Pix */
.pix-summary-header-box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.pix-val-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6B7280;
    display: block;
    margin-bottom: 2px;
}

.pix-val-amount {
    font-size: 2.1rem;
    font-weight: 900;
    color: #6C2BD9;
    line-height: 1.1;
}

.pix-method-right {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 20px;
    border-left: 1px solid #F3F4F6;
}

.pix-method-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #F3E8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pix-method-icon svg {
    width: 20px;
    height: 20px;
}

.pix-method-text strong {
    font-size: 0.98rem;
    font-weight: 800;
    color: #10002B;
    display: block;
}

.pix-method-text span {
    font-size: 0.78rem;
    color: #6B7280;
}

/* Box 2: Tempo para Pagar */
.pix-timer-card-box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.timer-clock-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #F3E8FF;
    color: #6C2BD9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timer-clock-icon i {
    width: 20px;
    height: 20px;
}

.timer-text-content {
    flex: 1;
}

.timer-text-content strong {
    font-size: 0.98rem;
    font-weight: 800;
    color: #10002B;
    display: block;
}

.timer-text-content span {
    font-size: 0.8rem;
    color: #6B7280;
}

.timer-pill-purple {
    background: #EFEAFE;
    color: #6C2BD9;
    font-size: 1.15rem;
    font-weight: 900;
    padding: 8px 18px;
    border-radius: 12px;
}

/* Box 3: QR Code Grande Centralizado */
.pix-qr-card-large {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.pix-qr-wrapper-large {
    background: #FFFFFF;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.pix-qr-instruction {
    font-size: 0.88rem;
    font-weight: 600;
    color: #6B7280;
}

/* Box 4: Pix Copia e Cola com Botão Roxo */
.pix-copia-card-box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

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

.pix-copia-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F3E8FF;
    color: #6C2BD9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pix-copia-titles strong {
    font-size: 0.98rem;
    font-weight: 800;
    color: #10002B;
    display: block;
}

.pix-copia-titles span {
    font-size: 0.8rem;
    color: #6B7280;
}

.btn-copiar-pix-purple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    background: #6C2BD9;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-copiar-pix-purple:hover {
    background: #5B21B6;
}

/* Box 5: Próxima Etapa Info */
.pix-next-step-box {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.next-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F3E8FF;
    color: #6C2BD9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.next-step-text strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #10002B;
    display: block;
    margin-bottom: 2px;
}

.next-step-text span {
    font-size: 0.82rem;
    color: #6B7280;
    line-height: 1.4;
}

@media (max-width: 768px) {

    /* Ocultar resumo da compra no Step 1, 2, 3, 4 e 5 no mobile */
    .checkout-layout:has(#stepView1.active) .checkout-right-card,
    .checkout-layout:has(#stepView2.active) .checkout-right-card,
    .checkout-layout:has(#stepView3.active) .checkout-right-card,
    .checkout-layout:has(#stepView4.active) .checkout-right-card,
    .checkout-layout:has(#stepView5.active) .checkout-right-card,
    body.step1-active .checkout-right-card,
    body.step2-active .checkout-right-card,
    body.step3-active .checkout-right-card,
    body.step4-active .checkout-right-card,
    body.step5-active .checkout-right-card {
        display: none !important;
    }

    /* Ajustes Ultra-Compactos do Step 3 Pix para caber na tela sem rolagem */
    .checkout-main {
        padding: 12px 0 30px;
    }

    .checkout-left-card {
        padding: 16px 14px;
        border-radius: 20px;
    }

    #stepView3 {
        padding: 0;
    }

    #stepView3 .step-tag-purple {
        margin-bottom: 4px;
    }

    #stepView3 .step-title {
        font-size: 1.25rem;
        line-height: 1.15;
        margin-bottom: 2px;
    }

    #stepView3 .step-subtitle {
        font-size: 0.78rem;
        margin-bottom: 10px;
    }

    .pix-summary-header-box {
        padding: 8px 12px;
        border-radius: 12px;
        margin-bottom: 8px;
    }

    .pix-val-label {
        font-size: 0.70rem;
    }

    .pix-val-amount {
        font-size: 1.35rem;
    }

    .pix-method-right {
        padding-left: 10px;
        gap: 6px;
    }

    .pix-method-icon {
        width: 26px;
        height: 26px;
    }

    .pix-method-text strong {
        font-size: 0.78rem;
    }

    .pix-method-text span {
        font-size: 0.64rem;
    }

    .pix-timer-card-box {
        padding: 8px 12px;
        border-radius: 12px;
        margin-bottom: 8px;
        gap: 8px;
    }

    .timer-clock-icon {
        width: 26px;
        height: 26px;
    }

    .timer-clock-icon i {
        width: 14px;
        height: 14px;
    }

    .timer-text-content strong {
        font-size: 0.78rem;
    }

    .timer-text-content span {
        font-size: 0.64rem;
    }

    .timer-pill-purple {
        font-size: 0.88rem;
        padding: 4px 10px;
        border-radius: 8px;
    }

    .pix-qr-card-large {
        padding: 10px 8px;
        border-radius: 14px;
        margin-bottom: 8px;
    }

    .pix-qr-wrapper-large {
        padding: 6px;
        margin-bottom: 6px;
        border-radius: 10px;
    }

    #pixQrSvg,
    #pixQrImage {
        width: 115px !important;
        height: 115px !important;
    }

    .pix-qr-instruction {
        font-size: 0.70rem;
    }

    .pix-copia-card-box {
        padding: 10px 12px;
        border-radius: 12px;
        margin-bottom: 8px;
    }

    .pix-copia-header {
        margin-bottom: 6px;
        gap: 8px;
    }

    .pix-copia-icon {
        width: 24px;
        height: 24px;
    }

    .pix-copia-icon i {
        width: 13px;
        height: 13px;
    }

    .pix-copia-titles strong {
        font-size: 0.78rem;
    }

    .pix-copia-titles span {
        font-size: 0.64rem;
    }

    .pix-input-button-group {
        padding: 4px 4px 4px 10px;
        border-radius: 10px;
    }

    .pix-input-button-group input {
        font-size: 0.75rem;
    }

    .btn-copiar-pix-purple {
        padding: 8px 12px;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    .pix-next-step-box {
        padding: 8px 12px;
        border-radius: 12px;
        margin-bottom: 8px;
        gap: 8px;
    }

    .next-step-icon {
        width: 24px;
        height: 24px;
    }

    .next-step-icon i {
        width: 13px;
        height: 13px;
    }

    .next-step-text strong {
        font-size: 0.78rem;
    }

    .next-step-text span {
        font-size: 0.66rem;
    }

    /* Ocultar a caixa/card branco especificamente no Step 5 no mobile para o layout ficar 100% solto e ajustado */
    body.step5-active .checkout-left-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* Bloqueio estrito de rolagem horizontal quando o Step 5 estiver ativo no mobile */
    body.step5-active {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    body.step5-active .checkout-main,
    body.step5-active .checkout-layout {
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* STEP 5 MOBILE ONLY: Estritamente isolado para não afetar outras etapas */
    body.step5-active #stepView5 {
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    body.step5-active #stepView5 .step-tag-purple {
        margin-left: auto;
        margin-right: auto;
    }

    body.step5-active #stepView5 .card-preview-section {
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0;
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    body.step5-active #stepView5 .step-title {
        font-size: 1.05rem !important;
        line-height: 1.25;
        margin-bottom: 8px !important;
        text-align: center;
        white-space: normal;
        word-break: break-word;
    }

    body.step5-active #stepView5 .card-container-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
        box-sizing: border-box;
    }

    body.step5-active #stepView5 .abafe-card-real {
        transform: scale(0.68);
        transform-origin: top center;
        margin-left: calc(50% - 256px);
        margin-bottom: -118px;
    }

    body.step5-active #stepView5 .card-actions-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 14px;
        align-items: center;
        box-sizing: border-box;
    }

    body.step5-active #stepView5 .btn-download-pdf,
    body.step5-active #stepView5 .btn-secondary-home {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 12px 18px;
        font-size: 0.88rem;
        box-sizing: border-box;
    }
}

@media (max-width: 580px) {
    body.step5-active #stepView5 .abafe-card-real {
        transform: scale(0.62);
        transform-origin: top center;
        margin-left: calc(50% - 256px);
        margin-bottom: -140px;
    }
}

@media (max-width: 400px) {
    body.step5-active #stepView5 .abafe-card-real {
        transform: scale(0.56);
        transform-origin: top center;
        margin-left: calc(50% - 256px);
        margin-bottom: -165px;
    }
}

/* @media print para salvamento direto de PDF */
@media print {
    body * {
        visibility: hidden;
    }

    #carteiraPrintContainer,
    #carteiraPrintContainer * {
        visibility: visible;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    #carteiraPrintContainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .abafe-card-real {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .card-preview-section {
        border-top: none;
        padding-top: 0;
    }

    .card-actions-wrapper,
    .checkout-header,
    .stepper-bar,
    .checkout-right-card,
    .whatsapp-float-container {
        display: none !important;
    }
}

/* ==========================================================================
   GATEWAY ERROR BOX & WHATSAPP REDIRECT STYLES (NO BROWSER POPUPS)
   ========================================================================== */
.gateway-error-box {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.35s ease-in-out;
}

.gateway-error-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #991B1B;
}

.gateway-error-icon {
    width: 24px;
    height: 24px;
    color: #DC2626;
    flex-shrink: 0;
    margin-top: 2px;
}

.gateway-error-content strong {
    font-size: 1rem;
    font-weight: 800;
    color: #991B1B;
    display: block;
    margin-bottom: 4px;
}

.gateway-error-content span {
    font-size: 0.88rem;
    color: #B91C1C;
    line-height: 1.45;
}

.btn-wa-gateway-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #25D366;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transition: var(--transition);
}

.btn-wa-gateway-error:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}

.btn-wa-gateway-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #25D366;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transition: var(--transition);
}

.btn-wa-gateway-error:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}

font-family: var(--font-main);
font-size: 1rem;
font-weight: 800;
border-radius: 999px;
text-decoration: none;
box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
transition: var(--transition);
}

.btn-wa-gateway-error:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}

.btn-wa-gateway-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #25D366;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transition: var(--transition);
}

.btn-wa-gateway-error:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}