/* =====================================================
   CHECKOUT PAGAR.ME V5 - ESTILOS CSS
   =====================================================
   Design premium com gradientes, animações suaves
   e tipografia Inter. Tema claro com destaques
   em gradiente púrpura/azul.
   ===================================================== */

/* =====================================================
   RESET E VARIÁVEIS
   ===================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores primárias — gradiente púrpura/azul */
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary: #7c5cbf;
    --primary-light: #a78bfa;
    --primary-dark: #553c9a;

    /* Cores de estado */
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;

    /* Neutros — Tema Claro */
    --bg: #f4f7f9;
    --bg-card: #ffffff;
    --bg-input: #f8f9fa;
    --bg-hover: #f0f1f3;
    --surface: #ffffff;
    --surface-light: #f0f1f5;
    --border: rgba(0, 0, 0, 0.1);
    --border-focus: var(--primary-light);
    --text: #1a1a2e;
    --text-secondary: #5a5a6e;
    --text-muted: #8a8a9e;

    /* Tipografia */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Espaçamento */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Sombras */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --glow: 0 0 20px rgba(118, 75, 162, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =====================================================
   BACKGROUND SUTIL
   ===================================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(167, 139, 250, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* =====================================================
   CONTAINER PRINCIPAL
   ===================================================== */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* =====================================================
   HEADER
   ===================================================== */
.checkout-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(118, 75, 162, 0.4));
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.lock-icon {
    font-size: 14px;
}

/* =====================================================
   LAYOUT PRINCIPAL (2 COLUNAS)
   ===================================================== */
.checkout-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    padding-bottom: 60px;
}

/* =====================================================
   SEÇÕES DO FORMULÁRIO
   ===================================================== */
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-section:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* =====================================================
   CARDS DE PLANO
   ===================================================== */
.plan-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.plan-card {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--bg-input);
    padding: 24px;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.plan-card:hover {
    border-color: var(--primary-light);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.plan-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(118, 75, 162, 0.06);
    box-shadow: var(--glow);
}

.plan-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: all 0.3s ease;
}

.plan-card:has(input:checked) .plan-check {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    border-color: var(--primary);
    color: white;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.plan-badge.best-value {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
}

.plan-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 8px;
}

.plan-price .currency {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.plan-price .amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.plan-price .cents {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.plan-price .period {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 4px;
}

.plan-savings {
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 6px;
    display: inline-block;
}

.plan-features {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-features li {
    padding: 3px 0;
}

/* =====================================================
   FORMULÁRIO - INPUTS
   ===================================================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-input {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
    background: #ffffff;
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a9e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select option {
    background: var(--surface);
    color: var(--text);
}

.form-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 4px;
    min-height: 18px;
    display: block;
}

/* =====================================================
   MÉTODOS DE PAGAMENTO
   ===================================================== */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.payment-method-option:hover {
    border-color: var(--primary-light);
}

.payment-method-option.active {
    border-color: var(--primary);
    background: rgba(118, 75, 162, 0.06);
}

.method-icon {
    font-size: 24px;
}

.method-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* =====================================================
   PREVIEW DO CARTÃO
   ===================================================== */
.card-preview {
    margin-bottom: 24px;
    perspective: 1000px;
}

.card-preview-front {
    width: 100%;
    max-width: 380px;
    height: 200px;
    border-radius: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 50%, #44337a 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.card-preview-front::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.card-chip {
    width: 45px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd700, #daa520);
    opacity: 0.8;
}

.card-number-preview {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder-preview {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.card-expiry-preview {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* =====================================================
   PIX INFO
   ===================================================== */
.pix-info {
    text-align: center;
    padding: 30px 20px;
}

.pix-icon-large {
    font-size: 48px;
    margin-bottom: 16px;
}

.pix-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.pix-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pix-highlights {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.pix-highlight-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.pix-highlight-icon {
    font-size: 16px;
}

/* =====================================================
   MULTIMEIO DE PAGAMENTO
   ===================================================== */
.multi-payment-form {
    padding: 20px 0;
}

.multi-payment-form h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.multi-payment-section {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
}

.multi-payment-section .section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.multi-payment-section .section-label .label-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.multi-remaining {
    text-align: center;
    padding: 12px;
    background: rgba(118, 75, 162, 0.06);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.multi-remaining strong {
    color: var(--primary);
    font-weight: 700;
}

.multi-method-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.multi-method-btn {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.multi-method-btn:hover {
    border-color: var(--primary-light);
}

.multi-method-btn.active {
    border-color: var(--primary);
    background: rgba(118, 75, 162, 0.06);
}

/* =====================================================
   CAMPOS DE SENHA
   ===================================================== */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text);
}

.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--bg-hover);
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: all 0.3s ease;
}

.password-strength-fill.weak {
    width: 33%;
    background: var(--error);
}

.password-strength-fill.medium {
    width: 66%;
    background: var(--warning);
}

.password-strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.password-strength-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.password-requirements {
    list-style: none;
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.password-requirements li {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.password-requirements li.met {
    color: var(--success);
}

.password-requirements li .req-icon {
    font-size: 12px;
}

/* =====================================================
   BOTÃO DE CHECKOUT
   ===================================================== */
.checkout-submit {
    margin-top: 8px;
}

.btn-checkout {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-checkout:hover::before {
    left: 100%;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.3);
}

.btn-checkout:active {
    transform: translateY(0);
}

.btn-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.checkout-terms {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.checkout-terms a {
    color: var(--primary);
    text-decoration: none;
}

.checkout-terms a:hover {
    text-decoration: underline;
}

/* =====================================================
   COLUNA DE RESUMO
   ===================================================== */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: sticky;
    top: 20px;
    box-shadow: var(--shadow);
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.summary-plan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.summary-plan-name {
    font-weight: 600;
    color: var(--text);
}

.summary-plan-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

/* =====================================================
   CUPOM DE DESCONTO
   ===================================================== */
.voucher-section {
    margin-bottom: 20px;
}

.voucher-input-group {
    display: flex;
    gap: 8px;
}

.voucher-input-group .form-input {
    flex: 1;
    text-transform: uppercase;
}

.btn-voucher {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface-light);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-voucher:hover {
    background: var(--primary);
    color: white;
}

.voucher-message {
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.voucher-message.success {
    color: var(--success);
}

.voucher-message.error {
    color: var(--error);
}

/* =====================================================
   TOTAIS
   ===================================================== */
.summary-totals {
    padding: 16px 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.summary-line.summary-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    padding: 12px 0;
}

.summary-line.summary-total span:last-child {
    color: var(--primary);
}

.discount-value {
    color: var(--success) !important;
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.installments-info {
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.interest-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =====================================================
   SELOS DE CONFIANÇA
   ===================================================== */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.trust-icon {
    font-size: 16px;
}

/* =====================================================
   MODAIS
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.modal-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.modal-message {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* PIX Result no Modal */
.pix-instruction {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.pix-qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.pix-qr-container img {
    max-width: 200px;
    border-radius: var(--radius-sm);
    border: 4px solid var(--border);
}

.pix-copy-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pix-copy-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pix-copy-group .form-input {
    flex: 1;
    font-size: 11px;
}

.pix-expires {
    font-size: 13px;
    color: var(--warning);
    margin-bottom: 20px;
}

/* =====================================================
   RESPONSIVO
   ===================================================== */
@media (max-width: 900px) {
    .checkout-main {
        grid-template-columns: 1fr;
    }

    .checkout-summary-column {
        order: -1;
    }

    .summary-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .checkout-container {
        padding: 0 12px;
    }

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

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

    .form-group.full-width {
        grid-column: 1;
    }

    .form-section {
        padding: 20px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .card-preview-front {
        height: 170px;
        padding: 18px;
    }

    .card-number-preview {
        font-size: 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .pix-highlights {
        flex-direction: column;
        align-items: center;
    }

    .modal-content {
        padding: 24px;
    }

    .password-requirements {
        grid-template-columns: 1fr;
    }

    .multi-method-select {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   TERMOS DO CONTRATO - CHECKBOX
   ===================================================== */
.terms-acceptance {
    margin-bottom: 16px;
}

.terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    transition: all 0.3s ease;
}

.terms-checkbox-label:hover {
    border-color: var(--primary-light);
    background: var(--bg-hover);
}

.terms-checkbox {
    display: none;
}

.terms-checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 4px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 1px;
}

.terms-checkbox:checked ~ .terms-checkmark {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    border-color: var(--primary);
}

.terms-checkbox:checked ~ .terms-checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.terms-text {
    flex: 1;
}

.terms-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--primary-dark);
}

/* =====================================================
   MODAL DE TERMOS DO CONTRATO
   ===================================================== */
.modal-terms-content {
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
}

.modal-terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-terms-header .modal-title {
    margin-bottom: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.modal-terms-body {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
    max-height: 50vh;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) var(--bg-input);
}

.modal-terms-body::-webkit-scrollbar {
    width: 6px;
}

.modal-terms-body::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px;
}

.modal-terms-body::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.modal-terms-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.modal-terms-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 8px;
}

.modal-terms-body h3:first-child {
    margin-top: 0;
}

.modal-terms-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.modal-terms-footer {
    padding: 16px 32px 24px;
    border-top: 1px solid var(--border);
}

/* =====================================================
   COUNTDOWN DE REDIRECIONAMENTO (PIX)
   ===================================================== */
.countdown-container {
    margin-bottom: 24px;
}

.countdown-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.countdown-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
    min-width: 30px;
}

.countdown-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-hover);
    overflow: hidden;
}

.countdown-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    width: 100%;
    transition: width 1s linear;
}

/* =====================================================
   BOTÃO SECUNDÁRIO (Modal de Erro)
   ===================================================== */
.btn-secondary {
    background: var(--surface-light) !important;
    color: var(--text) !important;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--bg-hover) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* =====================================================
   PIX POLLING STATUS
   ===================================================== */
.pix-polling-status {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: rgba(118, 75, 162, 0.06);
    border-radius: var(--radius-sm);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}