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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0f0f13;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.12) 0%, transparent 60%);
}

.container {
    max-width: 900px;
    width: 100%;
    background: #18181f;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.header {
    padding: 28px 32px 22px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.15) 0%, rgba(118,75,162,0.15) 100%);
    pointer-events: none;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.lock-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
}

.header-text h1 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.header-text p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}

.header-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ── Form ────────────────────────────────────────────────────────────────────── */
form { padding: 0; }

.form-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 28px 32px 0;
}

.panel:nth-child(1) { padding: 0 28px 28px 0;  border-right: 1px solid rgba(255,255,255,0.06); }
.panel:nth-child(2) { padding: 0 0 28px 28px; }
.panel-3 { padding: 28px 28px 0 0;  border-right: 1px solid rgba(255,255,255,0.06); border-top: 1px solid rgba(255,255,255,0.06); }
.panel-4 { padding: 28px 0 0 28px;  border-top: 1px solid rgba(255,255,255,0.06); }

/* ── Panel title ─────────────────────────────────────────────────────────────── */
.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.panel-title button {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 7px;
    background: rgba(102,126,234,0.12);
    color: #a5b4fc;
    border: 1px solid rgba(102,126,234,0.2);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0;
    text-transform: none;
    font-family: inherit;
}

.panel-title button:hover {
    background: rgba(102,126,234,0.22);
    border-color: rgba(102,126,234,0.35);
}

.panel-title button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Form elements ───────────────────────────────────────────────────────────── */
.form-footer {
    padding: 24px 32px 32px;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.label-opt {
    opacity: 0.4;
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

input, select {
    width: 100%;
    padding: 11px 14px;
    background: #1e1e28;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    transition: all 0.2s;
    font-family: inherit;
    outline: none;
}

input::placeholder { color: rgba(255,255,255,0.2); }

select {
    cursor: pointer;
    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='rgba(255,255,255,0.3)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

select option { background: #1e1e28; color: #fff; }

input:focus, select:focus {
    border-color: rgba(102,126,234,0.6);
    background: #22222e;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

input.valido   { border-color: rgba(16,185,129,0.5); }
input.invalido { border-color: rgba(239,68,68,0.5); }

.row { display: flex; gap: 12px; }
.col { flex: 1; }

/* ── Feedback ────────────────────────────────────────────────────────────────── */
.feedback {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
}

.feedback.valido   { color: #10b981; }
.feedback.invalido { color: #f87171; }

/* ── Abas de pagamento ────────────────────────────────────────────────────────── */
.tabs-pagamento {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.tab-pag {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: #1e1e28;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-pag:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
}

.tab-pag.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* ── PIX info box ─────────────────────────────────────────────────────────────── */
.pix-info-box {
    text-align: center;
    padding: 24px 16px;
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 12px;
}

.pix-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.pix-info-box p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.6; }
.pix-info-box strong { color: rgba(255,255,255,0.8); }

.pix-qr {
    text-align: center;
    padding: 12px 0 0;
}

.pix-qr img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    margin: 0 auto 16px;
    display: block;
}

.pix-copy {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.pix-copy input {
    flex: 1;
    font-size: 11px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.6);
    cursor: text;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.pix-copy button {
    flex-shrink: 0;
    padding: 10px 14px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 10px;
    color: #10b981;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
}

.pix-copy button:hover { background: rgba(16,185,129,0.25); }

.pix-aguardando {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pix-aguardando span { animation: blink 1.5s infinite; }

/* ── Botão principal ─────────────────────────────────────────────────────────── */
.btn-pagar {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn-pagar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

.btn-pagar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102,126,234,0.45);
}

.btn-pagar:active  { transform: translateY(0); }
.btn-pagar:disabled {
    background: #2a2a35;
    color: rgba(255,255,255,0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Resultado ───────────────────────────────────────────────────────────────── */
#resultado { padding: 0 32px; }

.sucesso, .erro {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sucesso {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.25);
    color: #6ee7b7;
}

.sucesso::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16,185,129,0.08), transparent);
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0%   { left: -100%; }
    100% { left: 100%; }
}

.erro {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #fca5a5;
}

.resultado-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
}

.resultado-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.sucesso .resultado-icon {
    background: rgba(16,185,129,0.2);
    color: #10b981;
    animation: pulse 2s infinite;
}

.erro .resultado-icon {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

.resultado-detalhes {
    background: rgba(255,255,255,0.04);
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.loading {
    text-align: center;
    color: rgba(255,255,255,0.35);
    padding: 14px 0;
    font-size: 14px;
}

/* ── Security badge ──────────────────────────────────────────────────────────── */
.security-badge {
    text-align: center;
    padding: 14px 32px 24px;
    color: rgba(255,255,255,0.2);
    font-size: 11px;
    border-top: 1px solid rgba(255,255,255,0.05);
    letter-spacing: 0.03em;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    body { padding: 12px; }
    .container { border-radius: 20px; }
    .header { padding: 22px 20px 16px; }
    .form-panels {
        grid-template-columns: 1fr;
        padding: 20px 20px 0;
    }
    .panel:nth-child(1) { padding: 0 0 24px 0; border-right: none; }
    .panel:nth-child(2) { padding: 24px 0 24px 0; border-top: 1px solid rgba(255,255,255,0.06); }
    .panel-3 { padding: 24px 0 24px 0; border-right: none; border-top: 1px solid rgba(255,255,255,0.06); }
    .panel-4 { padding: 24px 0 0 0; border-top: 1px solid rgba(255,255,255,0.06); }
    .form-footer { padding: 16px 20px 24px; }
    #resultado { padding: 0 20px; }
    .security-badge { padding: 12px 20px 20px; }
}
