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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
}

.checkout-container {
    width: 100%;
    max-width: 480px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 16px;
}

.checkout-header h1 {
    font-size: 20px;
    color: #1a1a2e;
    font-weight: 700;
}

.checkout-header .subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.curso-info {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.curso-nome {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

.curso-preco {
    font-size: 20px;
    font-weight: 700;
    color: #00a650;
    margin-left: 16px;
    white-space: nowrap;
}

form {
    background: #fff;
    border-radius: 10px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

fieldset {
    border: none;
    margin-bottom: 20px;
}

fieldset:last-of-type {
    margin-bottom: 0;
}

legend {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 12px;
}

.field {
    margin-bottom: 12px;
}

.field:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: #009ee3;
    background: #fff;
}

select {
    cursor: pointer;
}

.field-row {
    display: flex;
    gap: 12px;
}

.flex-1 { flex: 1; }
.flex-3 { flex: 3; }

.mp-field {
    height: 42px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 0 4px;
    background: #fafafa;
    transition: border-color 0.2s;
}

.mp-field:focus-within {
    border-color: #009ee3;
    background: #fff;
}

.mp-field iframe {
    width: 100%;
    height: 100%;
}

.msg-erro {
    background: #fff0f0;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    border: 1px solid #fdd;
}

button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: #009ee3;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: #007bb5;
}

button[type="submit"]:disabled {
    background: #b3d9f0;
    cursor: not-allowed;
}

/* Resultado */
.resultado {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 100;
}

.resultado-inner {
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.resultado-inner.sucesso h2 {
    color: #00a650;
}

.resultado-inner.pendente h2 {
    color: #f5a623;
}

.resultado-inner h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.resultado-inner p {
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
}

.id-pagamento {
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

/* Tabs de pagamento */
.payment-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #ddd;
}

.payment-tabs .tab {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    background: #fafafa;
    border: none;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    border-right: 1px solid #ddd;
}

.payment-tabs .tab:last-child {
    border-right: none;
}

.payment-tabs .tab.active {
    background: #009ee3;
    color: #fff;
}

.payment-tabs .tab:hover:not(.active) {
    background: #eef6fc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* PIX */
.pix-info, .boleto-info {
    text-align: center;
    padding: 16px 0;
}

.pix-icon, .boleto-icon {
    display: inline-block;
    font-size: 18px;
    font-weight: 800;
    color: #009ee3;
    background: #eef6fc;
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.pix-info p, .boleto-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
}

.pix-detalhe, .boleto-detalhe {
    font-size: 12px !important;
    color: #999 !important;
}

.pix-qr {
    width: 200px;
    height: 200px;
    margin: 16px auto;
    display: block;
    border-radius: 8px;
}

.pix-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.pix-copiacola {
    display: flex;
    gap: 8px;
    margin: 0 auto 16px;
    max-width: 360px;
}

.pix-copiacola input {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
}

.pix-copiacola button {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #009ee3;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* Boleto */
.boleto-barcode {
    font-size: 12px !important;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    word-break: break-all;
    margin-bottom: 12px;
}

.btn-boleto {
    display: inline-block;
    padding: 12px 32px;
    background: #009ee3;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

.btn-boleto:hover {
    background: #007bb5;
}

/* Responsivo */
@media (max-width: 500px) {
    body {
        padding: 16px 8px;
    }

    form {
        padding: 20px 16px;
    }

    .curso-info {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .curso-preco {
        margin-left: 0;
    }
}
