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

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

.payment-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

/* Header */
.payment-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    padding: 24px 28px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 6px;
}

.logo-r4 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}

.logo-4 {
    font-size: 32px;
    font-weight: 800;
    color: #F47920;
    letter-spacing: -1px;
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    color: #aaa;
    margin-left: 8px;
    letter-spacing: 3px;
    align-self: flex-end;
    margin-bottom: 4px;
}

.header-subtitle {
    color: #ccc;
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
}

/* Form */
.payment-form {
    padding: 24px 28px;
}

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

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

.form-group-small {
    flex: 0 0 80px;
}

.form-group-large {
    flex: 1;
}

.form-group-half {
    flex: 1;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus, select:focus {
    border-color: #F47920;
    box-shadow: 0 0 0 3px rgba(244, 121, 32, 0.12);
}

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

.field-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 3px;
}

/* Button */
.btn-pagar {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #F47920 0%, #e06610 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 8px;
}

.btn-pagar:hover {
    opacity: 0.92;
}

.btn-pagar:active {
    transform: scale(0.98);
}

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

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* Result */
.resultado {
    margin: 0 28px 24px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.resultado.success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.resultado.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.resultado .result-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}

.resultado .result-ref {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin: 6px 0;
}

.resultado .result-detail {
    font-size: 12px;
    color: #6b7280;
}

/* Footer */
.payment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #9ca3af;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .payment-container {
        border-radius: 8px;
    }

    .payment-form {
        padding: 20px;
    }

    .payment-header {
        padding: 20px;
    }
}
